Commit 21b4f48e authored by Robbie Gibson's avatar Robbie Gibson Committed by Commit Bot

[iOS] Replace AlertViewController colors with new semantic colors

Bug: 976681
Change-Id: I664faa59f53464cadb0ab73910936e49e7ad756d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1706850Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Robbie Gibson <rkgibson@google.com>
Cr-Commit-Position: refs/heads/master@{#678292}
parent 720c338a
......@@ -19,9 +19,6 @@
namespace {
// The alpha of the black chrome behind the alert view.
constexpr CGFloat kBackgroundAlpha = 0.4;
// Properties of the alert shadow.
constexpr CGFloat kShadowOffsetX = 0;
constexpr CGFloat kShadowOffsetY = 15;
......@@ -61,9 +58,6 @@ constexpr CGFloat kTextfieldStackInsetTrailing = 12;
constexpr CGFloat kTextfieldInset = 8;
// Colors for the action buttons.
constexpr int kButtonTextDestructiveColor = 0xdf322f;
// This is how many bits UIViewAnimationCurve needs to be shifted to be in
// UIViewAnimationOptions format. Must match the one in UIView.h.
constexpr NSUInteger kUIViewAnimationCurveToOptionsShift = 16;
......@@ -136,8 +130,7 @@ constexpr NSUInteger kUIViewAnimationCurveToOptionsShift = 16;
- (void)loadView {
[super loadView];
self.view.backgroundColor =
[[UIColor blackColor] colorWithAlphaComponent:kBackgroundAlpha];
self.view.backgroundColor = [UIColor colorNamed:kScrimBackgroundColor];
self.view.accessibilityViewIsModal = YES;
self.tapRecognizer = [[UITapGestureRecognizer alloc]
......@@ -399,7 +392,7 @@ constexpr NSUInteger kUIViewAnimationCurveToOptionsShift = 16;
textColor = [UIColor colorNamed:kTintColor];
} else { // Style is UIAlertActionStyleDestructive
font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
textColor = UIColorFromRGB(kButtonTextDestructiveColor);
textColor = [UIColor colorNamed:kDestructiveTintColor];
}
button.titleLabel.font = font;
button.titleLabel.adjustsFontForContentSizeCategory = YES;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment