I’m creating a GtkPopoverMenu programmatically in a GTK4/Rust application, and the popover is rendering too small, both too narrow and too short, with scrollbars appearing instead of it simply sizing itself to fit its contents (see the below image).
I’m creating it like this on right-click on the relevant widget:
let popover = gtk::PopoverMenu::from_model(Some(&menu_model));
popover.set_has_arrow(false);
popover.set_parent(&*imp.preview_scroller);
popover.set_halign(gtk::Align::Start);
popover.set_pointing_to(Some(>k::gdk::Rectangle::new(x as i32, y as i32, 0, 0)));
popover.popup();
The menu model is built dynamically in Rust using gtk::gio::Menu with two sections, one of which has a label. The popover is parented to a GtkScrolledWindow.
Is there something specific I need to do to allow a PopoverMenu to size itself naturally to its content?
