[evince] misc: Set gravity on popup menu in search box



commit 72cd654a8591a6a150413d7c5853b72fd382ae20
Author: Germán Poo-Caamaño <gpoo gnome org>
Date:   Tue Nov 13 01:04:19 2018 -0300

    misc: Set gravity on popup menu in search box
    
    Previously the menu would popup on the cursor position,
    however, it seems better to show it just below the icon,
    close to the entry border.

 libmisc/ev-search-box.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libmisc/ev-search-box.c b/libmisc/ev-search-box.c
index 5ae400ab..2bc8377d 100644
--- a/libmisc/ev-search-box.c
+++ b/libmisc/ev-search-box.c
@@ -353,8 +353,10 @@ entry_icon_release_cb (GtkEntry            *entry,
         ev_search_box_entry_populate_popup (box, menu);
         gtk_widget_show (menu);
 
-        gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
-                        event->button, event->time);
+        gtk_menu_popup_at_widget (GTK_MENU (menu), GTK_WIDGET (entry),
+                                 GDK_GRAVITY_SOUTH_WEST,
+                                 GDK_GRAVITY_NORTH_WEST,
+                                 (GdkEvent *)event);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]