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

Unified Diff: ui/native_theme/native_theme_mac.mm

Issue 2319313003: views: refactor away PlatformStyle::BackgroundColorForMdButton (Closed)
Patch Set: fix nits Created 4 years, 3 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: 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 ad847bac2369423bfd13174c862ca89db31ba5eb..43e2a670ebaa36f9058564108f5a35c2be77735c 100644
--- a/ui/native_theme/native_theme_mac.mm
+++ b/ui/native_theme/native_theme_mac.mm
@@ -126,7 +126,8 @@ SkColor NativeThemeMac::ApplySystemControlTint(SkColor color) {
}
SkColor NativeThemeMac::GetSystemColor(ColorId color_id) const {
- // Even with --secondary-ui-md, menus use the platform colors and styling.
+ // Even with --secondary-ui-md, menus use the platform colors and styling, and
+ // Mac has a couple of specific color overrides.
switch (color_id) {
case kColorId_EnabledMenuItemForegroundColor:
return NSSystemColorToSkColor([NSColor controlTextColor]);
@@ -145,6 +146,9 @@ SkColor NativeThemeMac::GetSystemColor(ColorId color_id) const {
: kMenuSeparatorColor;
case kColorId_MenuBorderColor:
return kMenuBorderColor;
+
+ case kColorId_ButtonPressedShade:
+ return SkColorSetA(SK_ColorBLACK, 0x08);
default:
break;
}

Powered by Google App Engine
This is Rietveld 408576698