Commit 977c472e authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

Change the color of the omnibox button's background

This CL changes the omnibox button's background to match the browsing
mode (incognito or normal).

Bug: 829769
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I052e1228332121e7e75b1b781dabd7c4e6c3083b
Reviewed-on: https://chromium-review.googlesource.com/1012840Reviewed-by: default avatarOlivier Robin <olivierrobin@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551278}
parent d61815f9
...@@ -44,7 +44,7 @@ const int styleCount = 2; ...@@ -44,7 +44,7 @@ const int styleCount = 2;
// Omnibox background. // Omnibox background.
const CGFloat kOmniboxBackgroundHeight = 38; const CGFloat kOmniboxBackgroundHeight = 38;
const CGFloat kOmniboxBackgroundCornerRadius = 13; const CGFloat kOmniboxBackgroundCornerRadius = 13;
const CGFloat kOmniboxBackgroundAlpha = 0.05; const CGFloat kOmniboxButtonBackgroundAlphaFactor = 0.5;
} // namespace } // namespace
@implementation ToolbarButtonFactory @implementation ToolbarButtonFactory
...@@ -423,7 +423,8 @@ const CGFloat kOmniboxBackgroundAlpha = 0.05; ...@@ -423,7 +423,8 @@ const CGFloat kOmniboxBackgroundAlpha = 0.05;
background.translatesAutoresizingMaskIntoConstraints = NO; background.translatesAutoresizingMaskIntoConstraints = NO;
background.userInteractionEnabled = NO; background.userInteractionEnabled = NO;
background.backgroundColor = background.backgroundColor =
[UIColor colorWithWhite:0 alpha:kOmniboxBackgroundAlpha]; [self.toolbarConfiguration locationBarBackgroundColorWithVisibility:
kOmniboxButtonBackgroundAlphaFactor];
background.layer.cornerRadius = kOmniboxBackgroundCornerRadius; background.layer.cornerRadius = kOmniboxBackgroundCornerRadius;
[omniboxButton addSubview:background]; [omniboxButton addSubview:background];
AddSameCenterConstraints(omniboxButton, background); AddSameCenterConstraints(omniboxButton, background);
......
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