Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1417)

Unified Diff: chrome/browser/gtk/menu_gtk.cc

Issue 175004: Ellipsize long entries in bookmark menus and the back/forward menus.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/gtk/menu_gtk.cc
===================================================================
--- chrome/browser/gtk/menu_gtk.cc (revision 24583)
+++ chrome/browser/gtk/menu_gtk.cc (working copy)
@@ -292,8 +292,12 @@
if (!start_align)
*x += widget->allocation.width - menu_req.width;
- if (*y + menu_req.height >= screen_rect.height)
+ // If the menu would run off the bottom of the screen, and there is more
+ // screen space up than down, then pop upwards.
+ if (*y + menu_req.height >= screen_rect.height &&
+ *y > screen_rect.height / 2) {
*y -= menu_req.height;
+ }
*push_in = FALSE;
}
« chrome/browser/gtk/back_forward_menu_model_gtk.cc ('K') | « chrome/browser/gtk/go_button_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698