Chromium Code Reviews| Index: ui/views/style/typography_provider.cc |
| diff --git a/ui/views/style/typography_provider.cc b/ui/views/style/typography_provider.cc |
| index ab46a0a9302cd072ba81234fc1e0eeda4ec4be09..acb35ddad3234c688b69b034849b2c90935952af 100644 |
| --- a/ui/views/style/typography_provider.cc |
| +++ b/ui/views/style/typography_provider.cc |
| @@ -7,6 +7,7 @@ |
| #include "base/logging.h" |
| #include "ui/base/default_style.h" |
| #include "ui/base/resource/resource_bundle.h" |
| +#include "ui/native_theme/native_theme.h" |
| #include "ui/views/style/typography.h" |
| using gfx::Font; |
| @@ -47,8 +48,16 @@ const gfx::FontList& DefaultTypographyProvider::GetFont(int context, |
| size_delta, Font::NORMAL, font_weight); |
| } |
| -SkColor DefaultTypographyProvider::GetColor(int context, int style) const { |
| - return SK_ColorBLACK; |
| +SkColor DefaultTypographyProvider::GetColor( |
| + int context, |
| + int style, |
| + const ui::NativeTheme& theme) const { |
| + switch (style) { |
| + case style::STYLE_DISABLED: |
| + return theme.GetSystemColor(ui::NativeTheme::kColorId_LabelDisabledColor); |
| + } |
| + |
| + return theme.GetSystemColor(ui::NativeTheme::kColorId_LabelEnabledColor); |
|
Peter Kasting
2017/06/01 04:55:58
Nit: Simpler:
return theme.GetSystemColor(
tapted
2017/06/01 11:22:18
Done.
|
| } |
| int DefaultTypographyProvider::GetLineHeight(int context, int style) const { |