summaryrefslogtreecommitdiffstats
path: root/views/controls
diff options
context:
space:
mode:
authorsaintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 21:48:44 +0000
committersaintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 21:48:44 +0000
commit067a16671a1faf2f460f5ebbddfbfb5d933c5cec (patch)
tree262f6c689c4b5b2bf097264a896d7db1ff8325fb /views/controls
parent7f65fce16f9dc4906a4e4a6379e2cda0a8913f4e (diff)
downloadchromium_src-067a16671a1faf2f460f5ebbddfbfb5d933c5cec.zip
chromium_src-067a16671a1faf2f460f5ebbddfbfb5d933c5cec.tar.gz
chromium_src-067a16671a1faf2f460f5ebbddfbfb5d933c5cec.tar.bz2
This CL increases the menu items size and the spacing between the status icons.
BUG=none TEST=none Review URL: http://codereview.chromium.org/7013042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85331 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r--views/controls/menu/menu_item_view_gtk.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/views/controls/menu/menu_item_view_gtk.cc b/views/controls/menu/menu_item_view_gtk.cc
index aabe58b..22e3d72 100644
--- a/views/controls/menu/menu_item_view_gtk.cc
+++ b/views/controls/menu/menu_item_view_gtk.cc
@@ -24,12 +24,21 @@ static const SkColor kSelectedBackgroundColor = SkColorSetRGB(0xDC, 0xE4, 0xFA);
static const SkColor kSelectedBackgroundColor = SkColorSetRGB(246, 249, 253);
#endif
+#if defined(TOUCH_UI)
+const int kMinTouchHeight = 46;
+#endif
+
gfx::Size MenuItemView::CalculatePreferredSize() {
const gfx::Font& font = GetFont();
+#if defined(TOUCH_UI)
+ int height = std::max(font.GetHeight(), kMinTouchHeight);
+#else
+ int height = font.GetHeight();
+#endif
return gfx::Size(
font.GetStringWidth(title_) + label_start_ +
item_right_margin_ + GetChildPreferredWidth(),
- font.GetHeight() + GetBottomMargin() + GetTopMargin());
+ height + GetBottomMargin() + GetTopMargin());
}
void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {