Chromium Code Reviews| 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..7f5cd2442f2c486a2f5453b72077693e29682d34 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,20 @@ - (void)drawWithFrame:(NSRect)frame inView:(NSView*)controlView { |
| } |
| // Draw the border. |
| + const ui::ThemeProvider* provider = [[controlView window] themeProvider]; |
| + bool increaseContrast = provider && provider->ShouldIncreaseContrast(); |
| if (!inDarkMode) { |
| const CGFloat kNormalStrokeGray = 168 / 255.; |
|
Mark Mentovai
2017/02/23 01:57:28
Scope tightly to where it’s used, inside the else
Elly Fong-Jones
2017/02/23 17:32:16
Done.
|
| - [[NSColor colorWithCalibratedWhite:kNormalStrokeGray alpha:1] set]; |
| + if (increaseContrast) |
| + [[NSColor blackColor] set]; |
| + else |
| + [[NSColor colorWithCalibratedWhite:kNormalStrokeGray alpha:1] set]; |
| } else { |
| const CGFloat k30PercentAlpha = 0.3; |
|
Mark Mentovai
2017/02/23 01:57:28
Me too.
Elly Fong-Jones
2017/02/23 17:32:16
Done.
|
| - [[NSColor colorWithCalibratedWhite:0 alpha:k30PercentAlpha] set]; |
| + if (increaseContrast) |
| + [[NSColor whiteColor] set]; |
| + else |
| + [[NSColor colorWithCalibratedWhite:0 alpha:k30PercentAlpha] set]; |
| } |
|
Mark Mentovai
2017/02/23 01:57:28
Not required, but consider factoring the -set out
Elly Fong-Jones
2017/02/23 17:32:16
I thought about doing this but I don't think it's
|
| [path stroke]; |