summaryrefslogtreecommitdiffstats
path: root/views/controls
diff options
context:
space:
mode:
authorsaintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-20 15:43:09 +0000
committersaintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-20 15:43:09 +0000
commit53262643ac0804f941088db577a442c72bf6563a (patch)
treea5aeb9cb7675e09ad9921d8d115a98de373a7aed /views/controls
parentab79692f684d05b53fa99d68f370e24c9aa5acf1 (diff)
downloadchromium_src-53262643ac0804f941088db577a442c72bf6563a.zip
chromium_src-53262643ac0804f941088db577a442c72bf6563a.tar.gz
chromium_src-53262643ac0804f941088db577a442c72bf6563a.tar.bz2
Revert workaround. This was problematic because it is relying
on an unrelated constant (kFavicon) which now has a different value for the touch case. BUG=none TEST=none Review URL: http://codereview.chromium.org/6879053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82294 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r--views/controls/menu/menu_item_view_gtk.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/views/controls/menu/menu_item_view_gtk.cc b/views/controls/menu/menu_item_view_gtk.cc
index 3c35a95..17604e4 100644
--- a/views/controls/menu/menu_item_view_gtk.cc
+++ b/views/controls/menu/menu_item_view_gtk.cc
@@ -26,14 +26,10 @@ static const SkColor kSelectedBackgroundColor = SkColorSetRGB(246, 249, 253);
gfx::Size MenuItemView::CalculatePreferredSize() {
const gfx::Font& font = MenuConfig::instance().font;
- // TODO(sky): this is a workaround until I figure out why font.height()
- // isn't returning the right thing. We really only want to include
- // kFaviconSize if we're showing icons.
- int content_height = std::max(kFaviconSize, font.GetHeight());
return gfx::Size(
font.GetStringWidth(title_) + label_start_ +
item_right_margin_ + GetChildPreferredWidth(),
- content_height + GetBottomMargin() + GetTopMargin());
+ font.GetHeight() + GetBottomMargin() + GetTopMargin());
}
void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {