diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-28 18:30:40 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-28 18:30:40 +0000 |
commit | 45b10f0917d6449aa53f66a6ea7fa6e8a4aea079 (patch) | |
tree | f076a28d17a165a80e89123ebbb93f71e71ffca7 /views | |
parent | 2370b9a7629014a89f7384d08a7110aa992a815d (diff) | |
download | chromium_src-45b10f0917d6449aa53f66a6ea7fa6e8a4aea079.zip chromium_src-45b10f0917d6449aa53f66a6ea7fa6e8a4aea079.tar.gz chromium_src-45b10f0917d6449aa53f66a6ea7fa6e8a4aea079.tar.bz2 |
Revert "Add Shutdown button to login/locker screen."
This reverts commit c2bafbefa8022337ba9520fd9a2f64fd2cd4c52f.
BUG=none
TEST=build bot should cycle green
Review URL: http://codereview.chromium.org/4119015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64282 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/button/text_button.cc | 15 | ||||
-rw-r--r-- | views/controls/button/text_button.h | 7 |
2 files changed, 7 insertions, 15 deletions
diff --git a/views/controls/button/text_button.cc b/views/controls/button/text_button.cc index 8e2bdea..bcff70d 100644 --- a/views/controls/button/text_button.cc +++ b/views/controls/button/text_button.cc @@ -15,8 +15,8 @@ namespace views { -// Default padding between the icon and text. -static const int kDefaultIconTextPadding = 5; +// Padding between the icon and text. +static const int kIconTextPadding = 5; // Preferred padding between text and edge static const int kPreferredPaddingHorizontal = 6; @@ -195,8 +195,7 @@ TextButton::TextButton(ButtonListener* listener, const std::wstring& text) max_width_(0), normal_has_border_(false), show_multiple_icon_states_(true), - prefix_type_(PREFIX_NONE), - icon_text_padding_(kDefaultIconTextPadding) { + prefix_type_(PREFIX_NONE) { SetText(text); set_border(new TextButtonBorder); SetAnimationDuration(kHoverAnimationDurationMs); @@ -298,7 +297,7 @@ void TextButton::Paint(gfx::Canvas* canvas, bool for_drag) { if (icon.width() > 0) { content_width += icon.width(); if (!text_.empty()) - content_width += icon_text_padding_; + content_width += kIconTextPadding; } // Place the icon along the left edge. int icon_x; @@ -312,7 +311,7 @@ void TextButton::Paint(gfx::Canvas* canvas, bool for_drag) { } int text_x = icon_x; if (icon.width() > 0) - text_x += icon.width() + icon_text_padding_; + text_x += icon.width() + kIconTextPadding; const int text_width = std::min(text_size_.width(), width() - insets.right() - text_x); int text_y = (available_height - text_size_.height()) / 2 + insets.top(); @@ -320,7 +319,7 @@ void TextButton::Paint(gfx::Canvas* canvas, bool for_drag) { // If the icon should go on the other side, swap the elements. if (icon_placement_ == ICON_ON_RIGHT) { int new_text_x = icon_x; - icon_x = new_text_x + text_width + icon_text_padding_; + icon_x = new_text_x + text_width + kIconTextPadding; text_x = new_text_x; } @@ -410,7 +409,7 @@ gfx::Size TextButton::GetPreferredSize() { insets.height()); if (icon_.width() > 0 && !text_.empty()) - prefsize.Enlarge(icon_text_padding_, 0); + prefsize.Enlarge(kIconTextPadding, 0); if (max_width_ > 0) prefsize.set_width(std::min(max_width_, prefsize.width())); diff --git a/views/controls/button/text_button.h b/views/controls/button/text_button.h index b96901e..d37f1aa 100644 --- a/views/controls/button/text_button.h +++ b/views/controls/button/text_button.h @@ -109,10 +109,6 @@ class TextButton : public CustomButton { void set_prefix_type(PrefixType type) { prefix_type_ = type; } - void set_icon_text_padding(int icon_text_padding) { - icon_text_padding_ = icon_text_padding; - } - // Sets the icon. void SetIcon(const SkBitmap& icon); void SetHoverIcon(const SkBitmap& icon); @@ -230,9 +226,6 @@ class TextButton : public CustomButton { PrefixType prefix_type_; - // Padding between icon and text. - int icon_text_padding_; - DISALLOW_COPY_AND_ASSIGN(TextButton); }; |