From 5bdbd2cf89429029885e1a343020e80e2525a1d0 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 25 Nov 2026 20:10:33 +0000 Subject: [PATCH] The font picker stays on the side it opened on --- crates/ui-egui/src/panels/text_panels.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/panels/text_panels.rs b/crates/ui-egui/src/panels/text_panels.rs index e80f20bfc..358c4ab17 100644 --- a/crates/ui-egui/src/panels/text_panels.rs +++ b/crates/ui-egui/src/panels/text_panels.rs @@ -1105,11 +1105,13 @@ fn header_menu( ) -> Option { egui::Popup::from_response(field) .open_bool(open) + .max_height_from_constrain(true) + .align_alternatives(&[egui::RectAlign::TOP_START]) .width(field.rect.width()) .close_behavior(egui::PopupCloseBehavior::CloseOnClickOutside) .show(|ui| { ui.set_min_width(ui.available_width()); - ui.set_max_height(height); + ui.set_max_height(height.min(ui.available_height())); let header = header(ui); egui::ScrollArea::vertical().max_height(ui.available_height().max(0.0)).show(ui, |ui| list(ui, header)).inner })