gtk: fix the alignment of the context menu (#5943)

This aligns the top left of the context menu with the right-click
location, rather than the top center.
pull/5944/head
Jeffrey C. Ollie 2025-02-22 18:37:41 -06:00 committed by GitHub
commit bdf0f27d1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -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,