| 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 49f741fac6dac8f5f13549e028f5511cb0420183..0e291cbd979da9aa84d1bea7b6d2fd0130fdea3d 100644
|
| --- a/ui/views/controls/button/label_button.cc
|
| +++ b/ui/views/controls/button/label_button.cc
|
| @@ -201,10 +201,7 @@ void LabelButton::SetIsDefault(bool is_default) {
|
| ui::Accelerator accel(ui::VKEY_RETURN, ui::EF_NONE);
|
| is_default_ ? AddAccelerator(accel) : RemoveAccelerator(accel);
|
|
|
| - const bool bold = PlatformStyle::kDefaultLabelButtonHasBoldFont && is_default;
|
| - label_->SetFontList(bold ? cached_bold_font_list_ : cached_normal_font_list_);
|
| - InvalidateLayout();
|
| - ResetLabelEnabledColor();
|
| + UpdateStyleForDefaultness();
|
| }
|
|
|
| void LabelButton::SetStyle(ButtonStyle style) {
|
| @@ -494,6 +491,14 @@ void LabelButton::ResetColorsFromNativeTheme() {
|
| }
|
| }
|
|
|
| +void LabelButton::UpdateStyleForDefaultness() {
|
| + const bool bold =
|
| + PlatformStyle::kDefaultLabelButtonHasBoldFont && is_default_;
|
| + label_->SetFontList(bold ? cached_bold_font_list_ : cached_normal_font_list_);
|
| + InvalidateLayout();
|
| + ResetLabelEnabledColor();
|
| +}
|
| +
|
| void LabelButton::UpdateImage() {
|
| image_->SetImage(GetImage(state()));
|
| ResetCachedPreferredSize();
|
|
|