Chromium Code Reviews| 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 6ca6a98194017f3476d310474ed5df20cbee658a..af3fb3fbb9e985ab2524b55200d466327dfeacf8 100644 |
| --- a/ui/views/controls/button/label_button.cc |
| +++ b/ui/views/controls/button/label_button.cc |
| @@ -35,13 +35,14 @@ const char LabelButton::kViewClassName[] = "views/LabelButton"; |
| LabelButton::LabelButton(ButtonListener* listener, const string16& text) |
| : CustomButton(listener), |
| image_(new ImageView()), |
| - label_(new Label(text)), |
| + label_(new Label()), |
|
tfarina
2013/04/05 12:44:27
you don't pass it through constructor anymore, bec
msw
2013/04/05 15:04:17
yes
|
| button_state_images_(), |
| button_state_colors_(), |
| explicitly_set_colors_(), |
| is_default_(false), |
| style_(STYLE_TEXTBUTTON) { |
| SetAnimationDuration(kHoverAnimationDurationMs); |
| + SetText(text); |
| AddChildView(image_); |
| image_->set_interactive(false); |
| @@ -72,6 +73,7 @@ const string16& LabelButton::GetText() const { |
| } |
| void LabelButton::SetText(const string16& text) { |
| + SetAccessibleName(text); |
| label_->SetText(text); |
| } |