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

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

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: ui/views/style/typography_provider.h
diff --git a/ui/views/style/typography_provider.h b/ui/views/style/typography_provider.h
index 76d6b6848aba2fcd7fe95d9e1b34b230b980b705..8f6f698646d66ecfae2cdf42f17adce66df5785e 100644
--- a/ui/views/style/typography_provider.h
+++ b/ui/views/style/typography_provider.h
@@ -14,6 +14,10 @@ namespace gfx {
class FontList;
}
+namespace ui {
+class NativeTheme;
+}
+
namespace views {
// Provides fonts to use in toolkit-views UI.
@@ -24,9 +28,11 @@ class VIEWS_EXPORT TypographyProvider {
// Gets the FontList for the given |context| and |style|.
virtual const gfx::FontList& GetFont(int context, int style) const = 0;
- // Gets the color for the given |context| and |style|. This may consult
- // ui::NativeTheme.
- virtual SkColor GetColor(int context, int style) const = 0;
+ // Gets the color for the given |context| and |style|, optionally consulting
+ // |native_theme|.
+ virtual SkColor GetColor(int context,
Peter Kasting 2017/06/01 04:55:58 Nit: Be consistent everywhere about whether these
tapted 2017/06/01 11:22:18 Done. Updated the TypographyProvider hierarchy to
Peter Kasting 2017/06/01 19:08:01 I have a weak preference for "short everywhere" or
tapted 2017/06/02 01:29:15 I made https://codereview.chromium.org/2918003002/
+ int style,
+ const ui::NativeTheme& native_theme) const = 0;
// Gets the line spacing, or 0 if it should be provided by gfx::FontList.
virtual int GetLineHeight(int context, int style) const = 0;
@@ -54,7 +60,9 @@ class VIEWS_EXPORT DefaultTypographyProvider : public TypographyProvider {
// TypographyProvider:
const gfx::FontList& GetFont(int context, int style) const override;
- SkColor GetColor(int context, int style) const override;
+ SkColor GetColor(int context,
+ int style,
+ const ui::NativeTheme& native_theme) const override;
int GetLineHeight(int context, int style) const override;
// Sets the |size_delta| and |font_weight| that the the default GetFont()

Powered by Google App Engine
This is Rietveld 408576698