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

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

Issue 2083813005: [Material][Mac] Update the incognito vector icon color to white (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment Created 4 years, 6 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 | « chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm ('k') | 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/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 e768691fac2b039fa5383d607711f964ee1ece75..3c0f7fbc48326669da57df72c7003c49d3b7fde4 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
@@ -89,7 +89,7 @@ const int kDefaultIconSize = 16;
// Color of the vector graphic icons when the location bar is dark.
// SkColorSetARGB(0xCC, 0xFF, 0xFF 0xFF);
-const SkColor kMaterialDarkVectorIconColor = 0xCCFFFFFF;
+const SkColor kMaterialDarkVectorIconColor = SK_ColorWHITE;
} // namespace
@@ -722,28 +722,27 @@ void LocationBarViewMac::UpdateLocationIcon() {
gfx::VectorIconId vector_icon_id = gfx::VectorIconId::VECTOR_ICON_NONE;
if (ShouldShowEVBubble()) {
vector_icon_id = gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID;
- vector_icon_color = in_dark_mode
- ? LocationBarDecoration::kMaterialDarkModeTextColor
- : gfx::kGoogleGreen700;
+ vector_icon_color = gfx::kGoogleGreen700;
} else {
vector_icon_id = omnibox_view_->GetVectorIcon();
- if (in_dark_mode) {
- vector_icon_color = LocationBarDecoration::kMaterialDarkModeTextColor;
+ security_state::SecurityStateModel::SecurityLevel security_level =
+ GetToolbarModel()->GetSecurityLevel(false);
+ if (security_level == security_state::SecurityStateModel::NONE) {
+ vector_icon_color = gfx::kChromeIconGrey;
} else {
- security_state::SecurityStateModel::SecurityLevel security_level =
- GetToolbarModel()->GetSecurityLevel(false);
- 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);
- }
+ NSColor* sRGBColor =
+ OmniboxViewMac::GetSecureTextColor(security_level, in_dark_mode);
+ NSColor* deviceColor =
+ [sRGBColor colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]];
+ vector_icon_color = skia::NSDeviceColorToSkColor(deviceColor);
}
}
+ // If the theme is dark, then the color should always be
+ // kMaterialDarkVectorIconColor.
+ if (in_dark_mode)
+ vector_icon_color = kMaterialDarkVectorIconColor;
+
DCHECK(vector_icon_id != gfx::VectorIconId::VECTOR_ICON_NONE);
NSImage* image =
[LocationBarImageRep imageForId:vector_icon_id color:vector_icon_color];
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698