diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-15 17:19:26 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-15 17:19:26 +0000 |
commit | 47aeffb5c6da28dacae6d0457b6ae8966c169e23 (patch) | |
tree | 6ecbf5ed9aa921577890a1a0c1d87fee579a6bbb /views/controls/button | |
parent | f4abfbb568e292857badbf4cfd1787ca66e02376 (diff) | |
download | chromium_src-47aeffb5c6da28dacae6d0457b6ae8966c169e23.zip chromium_src-47aeffb5c6da28dacae6d0457b6ae8966c169e23.tar.gz chromium_src-47aeffb5c6da28dacae6d0457b6ae8966c169e23.tar.bz2 |
Fixes two related bugs:
. Native buttons were adding 8 pixels to each side of the preferred
size. This isn't necessary on Gtk as the preferred size already
includes padding.
. I changed WidgetGtk so that it no longer needs to explicitly set a
size request. Explicitly setting a size request is a bit of pain
because it means you can't ask for the widget real size request
without unsetting the explicit size request. Instead I've subclassed
GtkFixed so that you can either have the default behavior, or use
the allocated size rather than current size.
CHROME_OS_BUG=1003
TEST=see bug
Review URL: http://codereview.chromium.org/504003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34564 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/button')
-rw-r--r-- | views/controls/button/native_button.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/views/controls/button/native_button.cc b/views/controls/button/native_button.cc index a8f22dd..141cf328 100644 --- a/views/controls/button/native_button.cc +++ b/views/controls/button/native_button.cc @@ -16,13 +16,17 @@ namespace views { -static const int kButtonBorderHWidth = 8; - #if defined(OS_WIN) // The min size in DLUs comes from // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/ch14e.asp static const int kMinWidthDLUs = 50; static const int kMinHeightDLUs = 14; + +// Horizontal padding (on each side). +static const int kButtonBorderHWidth = 8; +#else +// Horizontal padding (on each side). +static const int kButtonBorderHWidth = 0; #endif // static |