diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-04 23:32:04 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-04 23:32:04 +0000 |
commit | b7878ad5af389c084b09c270bf774aa73b238125 (patch) | |
tree | 7dd3fe72d8a7a2c33332dd320743725ae49be076 /app/gfx | |
parent | 8cc585ff4dc4239464ff73841cae62d1839faad1 (diff) | |
download | chromium_src-b7878ad5af389c084b09c270bf774aa73b238125.zip chromium_src-b7878ad5af389c084b09c270bf774aa73b238125.tar.gz chromium_src-b7878ad5af389c084b09c270bf774aa73b238125.tar.bz2 |
Fixes bug in textfield on views/gtk where we weren't properly
accounting for border size if not specified by style. Also changes
button on views/gtk not to fix the pref height at 29. There is no
reason for us to do this.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/462036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/gfx')
-rw-r--r-- | app/gfx/insets.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/app/gfx/insets.h b/app/gfx/insets.h index 6b8e9b1..f5806ac 100644 --- a/app/gfx/insets.h +++ b/app/gfx/insets.h @@ -5,6 +5,12 @@ #ifndef APP_GFX_INSETS_H_ #define APP_GFX_INSETS_H_ +#include "build/build_config.h" + +#if defined(OS_LINUX) +#include <gtk/gtkstyle.h> +#endif + namespace gfx { // @@ -16,7 +22,17 @@ class Insets { public: Insets() : top_(0), left_(0), bottom_(0), right_(0) {} Insets(int top, int left, int bottom, int right) - : top_(top), left_(left), bottom_(bottom), right_(right) { } + : top_(top), + left_(left), + bottom_(bottom), + right_(right) {} +#if defined(OS_LINUX) + explicit Insets(const GtkBorder& border) + : top_(border.top), + left_(border.left), + bottom_(border.bottom), + right_(border.right) {} +#endif ~Insets() {} |