diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-09 01:02:08 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-09 01:02:08 +0000 |
commit | dbaae79fc18a7de4bdebe031d9021b6204d91059 (patch) | |
tree | 258ba2f48da0eab3fc96f748a38fe16ae4e58d6b | |
parent | 87391dec73252794d6cf150445f0f86dafb791ac (diff) | |
download | chromium_src-dbaae79fc18a7de4bdebe031d9021b6204d91059.zip chromium_src-dbaae79fc18a7de4bdebe031d9021b6204d91059.tar.gz chromium_src-dbaae79fc18a7de4bdebe031d9021b6204d91059.tar.bz2 |
GTK: tweak where widget-anchored menus appear.
BUG=15443
TEST=see bug. Page/app menus + download item menus + bookmark bar menus should be fixed.
Review URL: http://codereview.chromium.org/672024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40978 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/gtk/menu_gtk.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/gtk/menu_gtk.cc b/chrome/browser/gtk/menu_gtk.cc index 7da5812..fdf6241 100644 --- a/chrome/browser/gtk/menu_gtk.cc +++ b/chrome/browser/gtk/menu_gtk.cc @@ -441,10 +441,11 @@ void MenuGtk::WidgetMenuPositionFunc(GtkMenu* menu, *x += widget->allocation.width - menu_req.width; // If the menu would run off the bottom of the screen, and there is more - // screen space up than down, then pop upwards. + // screen space up than down, then pop upwards. Also move the anchor point + // to the top of the widget rather than the bottom. if (*y + menu_req.height >= screen_rect.height && *y > screen_rect.height / 2) { - *y -= menu_req.height; + *y -= menu_req.height + widget->allocation.height; } *push_in = FALSE; |