diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-22 20:58:43 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-22 20:58:43 +0000 |
commit | cde6ab1092944e0370364f80b1d046498782a6ec (patch) | |
tree | 52483412ce14db4f06addc5413bad33e2e93806d | |
parent | 32cc14d2a33a4a7263e397d302c919475e47cd33 (diff) | |
download | chromium_src-cde6ab1092944e0370364f80b1d046498782a6ec.zip chromium_src-cde6ab1092944e0370364f80b1d046498782a6ec.tar.gz chromium_src-cde6ab1092944e0370364f80b1d046498782a6ec.tar.bz2 |
views: Update menu item text Y-position for Aura.
We draw text too high in menu items on Aura. This change
makes us round the Y-position of odd-height text so that it
ends up one pixel lower than it did before.
BUG=119388
TEST=manual: menu item text is one pixel lower and doesn't get clipped
Review URL: https://chromiumcodereview.appspot.com/9833002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128300 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ui/views/controls/menu/menu_item_view_views.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/views/controls/menu/menu_item_view_views.cc b/ui/views/controls/menu/menu_item_view_views.cc index 915798c..998ef62 100644 --- a/ui/views/controls/menu/menu_item_view_views.cc +++ b/ui/views/controls/menu/menu_item_view_views.cc @@ -72,7 +72,7 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) { int accel_width = parent_menu_item_->GetSubmenu()->max_accelerator_width(); int width = this->width() - item_right_margin_ - label_start_ - accel_width; gfx::Rect text_bounds(label_start_, top_margin + - (available_height - font.GetHeight()) / 2, width, + (available_height - font.GetHeight() + 1) / 2, width, font.GetHeight()); text_bounds.set_x(GetMirroredXForRect(text_bounds)); canvas->DrawStringInt(title(), font, fg_color, |