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

Unified Diff: chrome/browser/ui/views/harmony/chrome_typography.cc

Issue 2910153002: Remove views::Label::SetDisabledColor(). Replace with typography colors. (Closed)
Patch Set: Use STYLE_HINT more. Fix SadTab Created 3 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
Index: chrome/browser/ui/views/harmony/chrome_typography.cc
diff --git a/chrome/browser/ui/views/harmony/chrome_typography.cc b/chrome/browser/ui/views/harmony/chrome_typography.cc
index 5fc70512a2245318d268b10dda05f7a2aed41e19..b83b31ea357392e661d2c677197f0647c76830e5 100644
--- a/chrome/browser/ui/views/harmony/chrome_typography.cc
+++ b/chrome/browser/ui/views/harmony/chrome_typography.cc
@@ -45,3 +45,13 @@ const gfx::FontList& LegacyTypographyProvider::GetFont(int text_context,
return ui::ResourceBundle::GetSharedInstance().GetFontListWithDelta(
size_delta, kFontStyle, font_weight);
}
+
+SkColor LegacyTypographyProvider::GetColor(int context,
+ int style,
+ const ui::NativeTheme& theme) const {
+ // Use "disabled grey" for HINT and SECONDARY when Harmony is disabled.
+ if (style == STYLE_HINT || style == STYLE_SECONDARY)
+ style = views::style::STYLE_DISABLED;
+
+ return DefaultTypographyProvider::GetColor(context, style, theme);
+}

Powered by Google App Engine
This is Rietveld 408576698