diff options
author | markusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-31 12:18:19 +0000 |
---|---|---|
committer | markusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-31 12:18:19 +0000 |
commit | 445e2128b7c28657b5ef4d268300734cb72d6d8d (patch) | |
tree | 6ea3d5d3ef87cc520b25c34be20e363d3da0974a /ui | |
parent | 3f1baeb51404afa3ce44bc77d59a02b20c37a0c5 (diff) | |
download | chromium_src-445e2128b7c28657b5ef4d268300734cb72d6d8d.zip chromium_src-445e2128b7c28657b5ef4d268300734cb72d6d8d.tar.gz chromium_src-445e2128b7c28657b5ef4d268300734cb72d6d8d.tar.bz2 |
(Views only)Resize the menu buttons on the Website Settings UI to fit the button text.
BUG=113688
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10829038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149173 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/views/controls/button/menu_button.cc | 6 | ||||
-rw-r--r-- | ui/views/controls/button/menu_button.h | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/ui/views/controls/button/menu_button.cc b/ui/views/controls/button/menu_button.cc index fe33e35..3395b42 100644 --- a/ui/views/controls/button/menu_button.cc +++ b/ui/views/controls/button/menu_button.cc @@ -30,15 +30,13 @@ namespace views { // pressed event to show the menu. static const int64 kMinimumTimeBetweenButtonClicks = 100; -// How much padding to put on the left and right of the menu marker. -static const int kMenuMarkerPaddingLeft = 3; -static const int kMenuMarkerPaddingRight = -1; - // Default menu offset. static const int kDefaultMenuOffsetX = -2; static const int kDefaultMenuOffsetY = -4; // static +const int MenuButton::kMenuMarkerPaddingLeft = 3; +const int MenuButton::kMenuMarkerPaddingRight = -1; const char MenuButton::kViewClassName[] = "views/MenuButton"; //////////////////////////////////////////////////////////////////////////////// diff --git a/ui/views/controls/button/menu_button.h b/ui/views/controls/button/menu_button.h index 857a31d..2a05fdb 100644 --- a/ui/views/controls/button/menu_button.h +++ b/ui/views/controls/button/menu_button.h @@ -30,6 +30,10 @@ class VIEWS_EXPORT MenuButton : public TextButton { public: static const char kViewClassName[]; + // How much padding to put on the left and right of the menu marker. + static const int kMenuMarkerPaddingLeft; + static const int kMenuMarkerPaddingRight; + // Create a Button. MenuButton(ButtonListener* listener, const string16& text, @@ -37,9 +41,11 @@ class VIEWS_EXPORT MenuButton : public TextButton { bool show_menu_marker); virtual ~MenuButton(); + bool show_menu_marker() const { return show_menu_marker_; } void set_menu_marker(const gfx::ImageSkia* menu_marker) { menu_marker_ = menu_marker; } + const gfx::ImageSkia* menu_marker() const { return menu_marker_; } const gfx::Point& menu_offset() const { return menu_offset_; } void set_menu_offset(int x, int y) { menu_offset_.SetPoint(x, y); } |