OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/views/controls/button/label_button.h" | 5 #include "ui/views/controls/button/label_button.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "grit/ui_resources.h" | 8 #include "grit/ui_resources.h" |
9 #include "ui/base/resource/resource_bundle.h" | 9 #include "ui/base/resource/resource_bundle.h" |
10 #include "ui/gfx/animation/throb_animation.h" | 10 #include "ui/gfx/animation/throb_animation.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 } | 101 } |
102 | 102 |
103 const gfx::FontList& LabelButton::GetFontList() const { | 103 const gfx::FontList& LabelButton::GetFontList() const { |
104 return label_->font_list(); | 104 return label_->font_list(); |
105 } | 105 } |
106 | 106 |
107 void LabelButton::SetFontList(const gfx::FontList& font_list) { | 107 void LabelButton::SetFontList(const gfx::FontList& font_list) { |
108 label_->SetFontList(font_list); | 108 label_->SetFontList(font_list); |
109 } | 109 } |
110 | 110 |
111 const gfx::Font& LabelButton::GetFont() const { | |
112 return label_->font(); | |
113 } | |
114 | |
115 void LabelButton::SetFont(const gfx::Font& font) { | |
116 label_->SetFont(font); | |
117 } | |
118 | |
119 void LabelButton::SetElideBehavior(Label::ElideBehavior elide_behavior) { | 111 void LabelButton::SetElideBehavior(Label::ElideBehavior elide_behavior) { |
120 label_->SetElideBehavior(elide_behavior); | 112 label_->SetElideBehavior(elide_behavior); |
121 } | 113 } |
122 | 114 |
123 gfx::HorizontalAlignment LabelButton::GetHorizontalAlignment() const { | 115 gfx::HorizontalAlignment LabelButton::GetHorizontalAlignment() const { |
124 return label_->horizontal_alignment(); | 116 return label_->horizontal_alignment(); |
125 } | 117 } |
126 | 118 |
127 void LabelButton::SetHorizontalAlignment(gfx::HorizontalAlignment alignment) { | 119 void LabelButton::SetHorizontalAlignment(gfx::HorizontalAlignment alignment) { |
128 label_->SetHorizontalAlignment(alignment); | 120 label_->SetHorizontalAlignment(alignment); |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 return ui::NativeTheme::kNormal; | 384 return ui::NativeTheme::kNormal; |
393 } | 385 } |
394 | 386 |
395 ui::NativeTheme::State LabelButton::GetForegroundThemeState( | 387 ui::NativeTheme::State LabelButton::GetForegroundThemeState( |
396 ui::NativeTheme::ExtraParams* params) const { | 388 ui::NativeTheme::ExtraParams* params) const { |
397 GetExtraParams(params); | 389 GetExtraParams(params); |
398 return ui::NativeTheme::kHovered; | 390 return ui::NativeTheme::kHovered; |
399 } | 391 } |
400 | 392 |
401 } // namespace views | 393 } // namespace views |
OLD | NEW |