Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: ui/views/controls/button/text_button.h

Issue 10933049: Fixed position of plus image on action box button; added ICON_CENTERED placement to TextButton (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..233d791656c232c745455ea448832a98996b6d50 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 is valid only when text is empty.
};
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;
}
« no previous file with comments | « chrome/browser/ui/views/location_bar/action_box_button_view.cc ('k') | ui/views/controls/button/text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698