From 211d6c0c063614bdb8ece7599be0f2abca1827cf Mon Sep 17 00:00:00 2001 From: mbaksa <116127013+mbaksa@users.noreply.github.com> Date: Sun, 18 Oct 2026 10:24:05 +0200 Subject: [PATCH] UI: Font dropdown list height doesn't update when filter results increase (#1732) * Fix searchable combo box height when filter results increase * Clean up unnecessary blank lines --- crates/ui-egui/src/widgets.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/widgets.rs b/crates/ui-egui/src/widgets.rs index 32013e0ae6..7d0440b2b9 100644 --- a/crates/ui-egui/src/widgets.rs +++ b/crates/ui-egui/src/widgets.rs @@ -847,7 +847,9 @@ fn list_rows<'a>( ) -> (Option, f32, f32) { let mut out = None; let row_h = if preview.is_some() { COMBO_PREVIEW_ROW_H } else { ui.spacing().interact_size.y }; - let mut area = egui::ScrollArea::vertical().max_height(420.0); + let desired_h = (n as f32 * (row_h + ui.spacing().item_spacing.y)).min(420.0); + ui.set_min_height(desired_h); + let mut area = egui::ScrollArea::vertical().max_height(desired_h); if let (Some(h), Some((offset, view_h))) = (highlight, scroll) { let top = h as f32 * (row_h + ui.spacing().item_spacing.y); let bottom = top + row_h;