Index: ui/views/controls/button/label_button.cc |
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc |
index 901dbf4063f64c37de117ba5ec34ca68597219ba..ae4ffe05311dc2795415d21bba145d0f5b13575b 100644 |
--- a/ui/views/controls/button/label_button.cc |
+++ b/ui/views/controls/button/label_button.cc |
@@ -257,10 +257,6 @@ void LabelButton::GetExtraParams(ui::NativeTheme::ExtraParams* params) const { |
params->button.background_color = label()->background_color(); |
} |
-void LabelButton::UpdateImage() { |
- image_->SetImage(GetImage(state())); |
-} |
- |
void LabelButton::ResetColorsFromNativeTheme() { |
const ui::NativeTheme* theme = GetNativeTheme(); |
SkColor colors[STATE_COUNT] = { |
@@ -277,9 +273,6 @@ void LabelButton::ResetColorsFromNativeTheme() { |
theme == ui::NativeThemeWin::instance()); |
#endif |
- label_->SetBackgroundColor(theme->GetSystemColor( |
- ui::NativeTheme::kColorId_ButtonBackgroundColor)); |
- |
// Use hardcoded colors for inverted color scheme support and STYLE_BUTTON. |
if (gfx::IsInvertedColorScheme()) { |
constant_text_color = true; |
@@ -290,6 +283,8 @@ void LabelButton::ResetColorsFromNativeTheme() { |
} else if (style() == STYLE_BUTTON) { |
constant_text_color = true; |
colors[STATE_NORMAL] = kStyleButtonTextColor; |
+ label_->SetBackgroundColor(theme->GetSystemColor( |
+ ui::NativeTheme::kColorId_ButtonBackgroundColor)); |
label_->SetAutoColorReadabilityEnabled(false); |
label_->SetShadowColors(kStyleButtonShadowColor, kStyleButtonShadowColor); |
label_->SetShadowOffset(0, 1); |
@@ -306,6 +301,10 @@ void LabelButton::ResetColorsFromNativeTheme() { |
} |
} |
+void LabelButton::UpdateImage() { |
+ image_->SetImage(GetImage(state())); |
+} |
+ |
void LabelButton::StateChanged() { |
const gfx::Size previous_image_size(image_->GetPreferredSize()); |
UpdateImage(); |