From 0af256b57a381fc419bef89b5632c023a0d9e54a Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Sat, 22 Feb 2025 18:23:30 -0600 Subject: [PATCH] gtk: fix the alignment of the context menu This aligns the top left of the context menu with the right-click location, rather than the top center. --- src/apprt/gtk/menu.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/apprt/gtk/menu.zig b/src/apprt/gtk/menu.zig index c36ace646..92b636280 100644 --- a/src/apprt/gtk/menu.zig +++ b/src/apprt/gtk/menu.zig @@ -47,6 +47,7 @@ pub fn Menu( const menu_model = builder.getObject(gio.MenuModel, "menu").?; const menu_widget = gtk.PopoverMenu.newFromModelFull(menu_model, .{ .nested = true }); + menu_widget.as(gtk.Widget).setHalign(.start); menu_widget.as(gtk.Popover).setHasArrow(@intFromBool(arrow)); _ = gtk.Popover.signals.closed.connect( menu_widget,