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

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

Issue 1948963002: [Mac][Material Design] Fix toolbar height on Retina. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment. Created 4 years, 7 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
Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
index cd230fc9f45d901149c0c3a87dcee815c2d25903..48a30ef75872f3e03f2e297d33b845509481837a 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
@@ -23,7 +23,6 @@
namespace {
const CGFloat kAnimationDuration = 0.2;
const CGFloat kShadowInset = 3;
-const CGFloat kShadowColor = 69 / 255.;
}
@@ -86,11 +85,12 @@ const CGFloat kShadowColor = 69 / 255.;
// and non-Retina screens there would have to be logic to add and remove the
// view. It's easier just to always add it for Incognito mode and draw
// nothing into it.
- if (![[self window] inIncognitoMode] || [self cr_lineWidth] < 1) {
+ if (![[self window] inIncognitoModeWithSystemTheme] ||
+ [self cr_lineWidth] < 1) {
return;
}
[[AutocompleteTextField shadowColor] set];
- NSRectFill(rect);
+ NSRectFillUsingOperation(rect, NSCompositeSourceOver);
}
@end
@@ -104,7 +104,7 @@ const CGFloat kShadowColor = 69 / 255.;
}
+ (NSColor*)shadowColor {
- return [NSColor colorWithGenericGamma22White:kShadowColor alpha:1];
+ return [NSColor colorWithGenericGamma22White:0 alpha:0.14];
}
- (void)dealloc {
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm ('k') | chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698