Chromium Code Reviews| Index: ui/views/controls/button/text_button.cc |
| =================================================================== |
| --- ui/views/controls/button/text_button.cc (revision 172348) |
| +++ ui/views/controls/button/text_button.cc (working copy) |
| @@ -207,21 +207,17 @@ |
| show_multiple_icon_states_(true), |
| is_default_(false), |
| multi_line_(false), |
| - color_(ui::NativeTheme::instance()->GetSystemColor( |
| - ui::NativeTheme::kColorId_TextButtonEnabledColor)), |
| - color_enabled_(ui::NativeTheme::instance()->GetSystemColor( |
| - ui::NativeTheme::kColorId_TextButtonEnabledColor)), |
| - color_disabled_(ui::NativeTheme::instance()->GetSystemColor( |
| - ui::NativeTheme::kColorId_TextButtonDisabledColor)), |
| - color_highlight_(ui::NativeTheme::instance()->GetSystemColor( |
| - ui::NativeTheme::kColorId_TextButtonHighlightColor)), |
| - color_hover_(ui::NativeTheme::instance()->GetSystemColor( |
| - ui::NativeTheme::kColorId_TextButtonHoverColor)), |
| + color_(0), |
|
msw
2012/12/12 19:38:16
nit: Skip initializing these values to 0.
cpu_(ooo_6.6-7.5)
2012/12/12 22:53:25
Done.
|
| + color_enabled_(0), |
| + color_disabled_(0), |
| + color_highlight_(0), |
| + color_hover_(0), |
| use_enabled_color_from_theme_(true), |
| use_disabled_color_from_theme_(true), |
| use_highlight_color_from_theme_(true), |
| use_hover_color_from_theme_(true) { |
| SetText(text); |
| + OnNativeThemeChanged(ui::NativeTheme::instance()); |
| SetAnimationDuration(kHoverAnimationDurationMs); |
| } |
| @@ -534,11 +530,11 @@ |
| void TextButtonBase::OnNativeThemeChanged(const ui::NativeTheme* theme) { |
| if (use_enabled_color_from_theme_) { |
| color_enabled_ = theme->GetSystemColor( |
| - ui::NativeTheme::kColorId_TextButtonEnabledColor); |
| + ui::NativeTheme::kColorId_LabelEnabledColor); |
|
msw
2012/12/12 19:38:16
Repurpose kColorId_TextButtonEnabledColor to get C
cpu_(ooo_6.6-7.5)
2012/12/12 22:53:25
Done.
|
| } |
| if (use_disabled_color_from_theme_) { |
| color_disabled_ = theme->GetSystemColor( |
| - ui::NativeTheme::kColorId_TextButtonDisabledColor); |
| + ui::NativeTheme::kColorId_LabelDisabledColor); |
|
msw
2012/12/12 19:38:16
Using kColorId_LabelDisabledColor (COLOR_GRAYTEXT)
cpu_(ooo_6.6-7.5)
2012/12/12 22:53:25
Done.
|
| } |
| if (use_highlight_color_from_theme_) { |
| color_highlight_ = theme->GetSystemColor( |
|
cpu_(ooo_6.6-7.5)
2012/12/12 03:42:12
highlight_ is only used on windows and only in PB_
|