From 0371dd95dd3dc8b4b76fb59d3ba744b49b2b167a Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Sat, 23 Oct 2021 18:48:51 +0200 Subject: sdgui: fix popup menu alignment On Windows 10 GTK+ completely failed to turn it around so that it would be visible. --- src/sdgui.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sdgui.c b/src/sdgui.c index 7e43db6..8bfb6e6 100644 --- a/src/sdgui.c +++ b/src/sdgui.c @@ -407,6 +407,7 @@ main (int argc, char *argv[]) G_CALLBACK (on_selection_watch_toggle), NULL); GtkWidget *menu = gtk_menu_new (); + gtk_widget_set_halign (menu, GTK_ALIGN_END); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item_open); #ifndef WIN32 gtk_menu_shell_append (GTK_MENU_SHELL (menu), item_selection); @@ -414,10 +415,10 @@ main (int argc, char *argv[]) gtk_widget_show_all (menu); g.hamburger = gtk_menu_button_new (); - gtk_menu_button_set_direction - (GTK_MENU_BUTTON (g.hamburger), GTK_ARROW_NONE); - gtk_menu_button_set_popup (GTK_MENU_BUTTON (g.hamburger), menu); gtk_button_set_relief (GTK_BUTTON (g.hamburger), GTK_RELIEF_NONE); + gtk_button_set_image (GTK_BUTTON (g.hamburger), gtk_image_new_from_icon_name + ("open-menu-symbolic", GTK_ICON_SIZE_BUTTON)); + gtk_menu_button_set_popup (GTK_MENU_BUTTON (g.hamburger), menu); gtk_widget_show (g.hamburger); g.notebook = gtk_notebook_new (); -- cgit v1.2.3-70-g09d2