Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm

Issue 2710003003: omnibox: use dark border stroke in Increase Contrast mode (Closed)
Patch Set: relocate some constants Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
index f7b55825e0ed2cc0bf6c4327197ceacec888c2cf..02ba77a04b7e081577d5b2d927b2c09fd19db029 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
@@ -361,12 +361,22 @@ size_t CalculatePositionsInFrame(
}
// Draw the border.
+ const ui::ThemeProvider* provider = [[controlView window] themeProvider];
+ bool increaseContrast = provider && provider->ShouldIncreaseContrast();
if (!inDarkMode) {
- const CGFloat kNormalStrokeGray = 168 / 255.;
- [[NSColor colorWithCalibratedWhite:kNormalStrokeGray alpha:1] set];
+ if (increaseContrast) {
+ [[NSColor blackColor] set];
+ } else {
+ const CGFloat kNormalStrokeGray = 168 / 255.;
+ [[NSColor colorWithCalibratedWhite:kNormalStrokeGray alpha:1] set];
+ }
} else {
- const CGFloat k30PercentAlpha = 0.3;
- [[NSColor colorWithCalibratedWhite:0 alpha:k30PercentAlpha] set];
+ if (increaseContrast) {
+ [[NSColor whiteColor] set];
+ } else {
+ const CGFloat k30PercentAlpha = 0.3;
+ [[NSColor colorWithCalibratedWhite:0 alpha:k30PercentAlpha] set];
+ }
}
[path stroke];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698