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

Unified Diff: ui/native_theme/native_theme_mac.mm

Issue 2948083002: MacViews: Use the Aura color for prominent button backgrounds. (Closed)
Patch Set: comment Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/native_theme_mac.mm
diff --git a/ui/native_theme/native_theme_mac.mm b/ui/native_theme/native_theme_mac.mm
index 5b46fbb44f658c1c242c51ad53c565bee67b820f..a88fafc9fc404c36898cbcb08279b01f01c71d01 100644
--- a/ui/native_theme/native_theme_mac.mm
+++ b/ui/native_theme/native_theme_mac.mm
@@ -181,8 +181,12 @@ SkColor NativeThemeMac::GetSystemColor(ColorId color_id) const {
// Buttons and labels.
case kColorId_ButtonEnabledColor:
case kColorId_LabelEnabledColor:
- case kColorId_ProminentButtonColor:
return NSSystemColorToSkColor([NSColor controlTextColor]);
+ // NSColor doesn't offer a color for prominent buttons. Use the Aura color,
+ // but apply the system tint. This is a good match for the blue Cocoa uses
+ // to draw buttons that are given a \n key equivalent.
+ case kColorId_ProminentButtonColor:
+ return ApplySystemControlTint(GetAuraColor(color_id, this));
case kColorId_ButtonDisabledColor:
case kColorId_LabelDisabledColor:
return NSSystemColorToSkColor([NSColor disabledControlTextColor]);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698