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

Unified Diff: chrome/browser/themes/theme_service_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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/theme_service_mac.mm
diff --git a/chrome/browser/themes/theme_service_mac.mm b/chrome/browser/themes/theme_service_mac.mm
index 56e7f5f48d9b3c3b3f2b8272cdcb6b22f485c308..a5654b94eff35a438fc1f8dfdb8cf49d10a3d705 100644
--- a/chrome/browser/themes/theme_service_mac.mm
+++ b/chrome/browser/themes/theme_service_mac.mm
@@ -183,7 +183,8 @@ NSColor* ThemeService::GetNSColor(int id, bool incognito) const {
DCHECK(CalledOnValidThread());
int original_id = id;
- if (ui::MaterialDesignController::IsModeMaterial() && incognito) {
+ const bool is_mode_material = ui::MaterialDesignController::IsModeMaterial();
+ if (is_mode_material && incognito) {
id += kMaterialDesignIdOffset;
}
@@ -193,7 +194,12 @@ NSColor* ThemeService::GetNSColor(int id, bool incognito) const {
return nscolor_iter->second;
SkColor sk_color = GetColor(original_id, incognito);
- NSColor* color = skia::SkColorToCalibratedNSColor(sk_color);
+ NSColor* color = nil;
+ if (is_mode_material) {
+ color = skia::SkColorToSRGBNSColor(sk_color);
+ } else {
+ color = skia::SkColorToCalibratedNSColor(sk_color);
+ }
// We loaded successfully. Cache the color.
if (color)
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698