Chromium Code Reviews| Index: ui/views/controls/label.cc |
| diff --git a/ui/views/controls/label.cc b/ui/views/controls/label.cc |
| index f42289e461eadbd0dafaf676f728b8cc156fa670..f02436ff5c5d274e2e0d39d9386efe4a9ae09798 100644 |
| --- a/ui/views/controls/label.cc |
| +++ b/ui/views/controls/label.cc |
| @@ -21,6 +21,7 @@ |
| #include "ui/gfx/color_utils.h" |
| #include "ui/gfx/font.h" |
| #include "ui/gfx/insets.h" |
| +#include "ui/gfx/native_theme.h" |
| #include "ui/views/background.h" |
| namespace views { |
| @@ -360,17 +361,12 @@ void Label::Init(const string16& text, const gfx::Font& font) { |
| static SkColor kDefaultDisabledColor; |
| static SkColor kDefaultBackgroundColor; |
| if (!initialized) { |
| -#if defined(OS_WIN) |
| - kDefaultEnabledColor = color_utils::GetSysSkColor(COLOR_WINDOWTEXT); |
| - kDefaultDisabledColor = color_utils::GetSysSkColor(COLOR_GRAYTEXT); |
| - kDefaultBackgroundColor = color_utils::GetSysSkColor(COLOR_WINDOW); |
| -#else |
| - // TODO(beng): source from theme provider. |
| - kDefaultEnabledColor = SK_ColorBLACK; |
| - kDefaultDisabledColor = SK_ColorGRAY; |
| - kDefaultBackgroundColor = SK_ColorWHITE; |
| -#endif |
| - |
| + kDefaultEnabledColor = gfx::NativeTheme::instance()->GetSystemColor( |
|
sky
2012/04/30 20:52:05
Do we really need to cache these values here and i
jennyz
2012/04/30 21:23:09
Done.
|
| + gfx::NativeTheme::kColorId_LabelEnabledColor); |
| + kDefaultDisabledColor = gfx::NativeTheme::instance()->GetSystemColor( |
| + gfx::NativeTheme::kColorId_LabelDisabledColor); |
| + kDefaultBackgroundColor = gfx::NativeTheme::instance()->GetSystemColor( |
| + gfx::NativeTheme::kColorId_LabelBackgroundColor); |
| initialized = true; |
| } |