| 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 03738f883802bfe35e3d00636ae559ae0e8e2475..21891fca927332c33e9336ab28c08d6d08eabedd 100644
|
| --- a/ui/views/controls/button/label_button.cc
|
| +++ b/ui/views/controls/button/label_button.cc
|
| @@ -159,25 +159,13 @@ void LabelButton::SetTextSubpixelRenderingEnabled(bool enabled) {
|
| label_->SetSubpixelRenderingEnabled(enabled);
|
| }
|
|
|
| -const gfx::FontList& LabelButton::GetFontList() const {
|
| - return label_->font_list();
|
| -}
|
| -
|
| -void LabelButton::SetFontList(const gfx::FontList& font_list) {
|
| - cached_normal_font_list_ = font_list;
|
| - if (PlatformStyle::kDefaultLabelButtonHasBoldFont) {
|
| - cached_bold_font_list_ = font_list.DeriveWithWeight(
|
| - GetValueBolderThan(font_list.GetFontWeight()));
|
| - if (is_default_) {
|
| - label_->SetFontList(cached_bold_font_list_);
|
| - return;
|
| - }
|
| - }
|
| - label_->SetFontList(cached_normal_font_list_);
|
| +void LabelButton::SetFontListDeprecated(const gfx::FontList& font_list) {
|
| + SetFontList(font_list);
|
| }
|
|
|
| void LabelButton::AdjustFontSize(int font_size_delta) {
|
| - LabelButton::SetFontList(GetFontList().DeriveWithSizeDelta(font_size_delta));
|
| + LabelButton::SetFontList(
|
| + label()->font_list().DeriveWithSizeDelta(font_size_delta));
|
| }
|
|
|
| void LabelButton::SetElideBehavior(gfx::ElideBehavior elide_behavior) {
|
| @@ -393,6 +381,19 @@ gfx::Rect LabelButton::GetChildAreaBounds() {
|
| return GetLocalBounds();
|
| }
|
|
|
| +void LabelButton::SetFontList(const gfx::FontList& font_list) {
|
| + cached_normal_font_list_ = font_list;
|
| + if (PlatformStyle::kDefaultLabelButtonHasBoldFont) {
|
| + cached_bold_font_list_ = font_list.DeriveWithWeight(
|
| + GetValueBolderThan(font_list.GetFontWeight()));
|
| + if (is_default_) {
|
| + label_->SetFontList(cached_bold_font_list_);
|
| + return;
|
| + }
|
| + }
|
| + label_->SetFontList(cached_normal_font_list_);
|
| +}
|
| +
|
| void LabelButton::OnPaint(gfx::Canvas* canvas) {
|
| View::OnPaint(canvas);
|
| Painter::PaintFocusPainter(this, canvas, focus_painter_.get());
|
|
|