From cf4f5f3cbac362f73fb6de12940164bb2f6afe3c Mon Sep 17 00:00:00 2001 From: bflatastic Date: Fri, 27 Nov 2026 15:00:58 +0700 Subject: [PATCH] ui-egui: a popup menu takes alignment alternatives again --- crates/ui-egui/src/panels/right/menu.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/ui-egui/src/panels/right/menu.rs b/crates/ui-egui/src/panels/right/menu.rs index 6f26fb062..9cdea6fa6 100644 --- a/crates/ui-egui/src/panels/right/menu.rs +++ b/crates/ui-egui/src/panels/right/menu.rs @@ -86,6 +86,11 @@ impl Menu { Self(self.0.close_behavior(behavior)) } + /// Where the menu may go when its first placement doesn't fit, in order. + pub fn align_alternatives(self, alternatives: &'static [egui::RectAlign]) -> Self { + Self(self.0.align_alternatives(alternatives)) + } + /// Show the menu while it is open. Its rows `content` scroll with the wheel or the scroll bar /// once they were taller than the window last frame, as the main menu's do (#2217); a menu /// that fits is laid out as it is, so it still grows with its rows (a scroll area in a popup