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

Unified Diff: ui/views/style/typography_provider.cc

Issue 2957263002: Update dialog button text color for Harmony per the latest button spec (Closed)
Patch Set: color_utils::IsInvertedColorScheme(), fewer Win constants 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 | « ui/views/controls/label.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/style/typography_provider.cc
diff --git a/ui/views/style/typography_provider.cc b/ui/views/style/typography_provider.cc
index 11bce4e92bc6465d84020f90d904fa30116c4e60..4c10182482587ce6bec942afdc80a51b9732f711 100644
--- a/ui/views/style/typography_provider.cc
+++ b/ui/views/style/typography_provider.cc
@@ -52,6 +52,20 @@ SkColor DefaultTypographyProvider::GetColor(
int context,
int style,
const ui::NativeTheme& theme) const {
+ if (context == style::CONTEXT_BUTTON_MD) {
+ ui::NativeTheme::ColorId color_id =
+ ui::NativeTheme::kColorId_ButtonEnabledColor;
+ switch (style) {
+ case views::style::STYLE_DIALOG_BUTTON_DEFAULT:
+ color_id = ui::NativeTheme::kColorId_TextOnProminentButtonColor;
+ break;
+ case views::style::STYLE_DISABLED:
+ color_id = ui::NativeTheme::kColorId_ButtonDisabledColor;
+ break;
+ }
+ return theme.GetSystemColor(color_id);
+ }
+
return theme.GetSystemColor(
(style == style::STYLE_DISABLED)
? ui::NativeTheme::kColorId_LabelDisabledColor
« no previous file with comments | « ui/views/controls/label.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698