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

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

Issue 2013183003: [Mac][Material Design] Bring Omnibox stroke and MD colors up to spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error. 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/location_bar_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index 50d7650fd188890c735c6db89ec077c78772c392..f4ea29a5901ee79692407df978956765e1eaae17 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -583,11 +583,15 @@ void LocationBarViewMac::UpdateLocationIcon() {
} else {
security_state::SecurityStateModel::SecurityLevel security_level =
GetToolbarModel()->GetSecurityLevel(false);
- vector_icon_color =
- (security_level == security_state::SecurityStateModel::NONE)
- ? OmniboxViewMac::BaseTextColorSkia(in_dark_mode)
- : skia::NSDeviceColorToSkColor(OmniboxViewMac::GetSecureTextColor(
- security_level, in_dark_mode));
+ if (security_level == security_state::SecurityStateModel::NONE) {
+ vector_icon_color = OmniboxViewMac::BaseTextColorSkia(in_dark_mode);
+ } else {
+ NSColor* sRGBColor =
+ OmniboxViewMac::GetSecureTextColor(security_level, in_dark_mode);
+ NSColor* deviceColor =
+ [sRGBColor colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]];
+ vector_icon_color = skia::NSDeviceColorToSkColor(deviceColor);
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698