Chromium Code Reviews| Index: ui/views/controls/button/text_button.h |
| diff --git a/ui/views/controls/button/text_button.h b/ui/views/controls/button/text_button.h |
| index 99feea600be6cbe837583bb2b5144bc9f16ae8e7..f509a466e1873e093fb2e9d0bf18724a1421e28a 100644 |
| --- a/ui/views/controls/button/text_button.h |
| +++ b/ui/views/controls/button/text_button.h |
| @@ -328,11 +328,14 @@ class VIEWS_EXPORT TextButton : public TextButtonBase { |
| // Meanings are reversed for right-to-left layouts. |
| enum IconPlacement { |
| ICON_ON_LEFT, |
| - ICON_ON_RIGHT |
| + ICON_ON_RIGHT, |
| + ICON_CENTERED // Centered make sense only when text is empty. |
|
Ben Goodger (Google)
2012/09/13 15:41:11
Centered is valid only when text is empty.
yefimt
2012/09/13 16:12:48
Done.
|
| }; |
| IconPlacement icon_placement() { return icon_placement_; } |
| void set_icon_placement(IconPlacement icon_placement) { |
| + // ICON_CENTERED works only when |text_| is empty. |
| + DCHECK((icon_placement != ICON_CENTERED) || text_.empty()); |
| icon_placement_ = icon_placement; |
| } |