From 5f86f33c4274bd14f52a6f8f2a50a43e34e4ff11 Mon Sep 17 00:00:00 2001 From: Paul Gemignani <4waymedia@gmail.com> Date: Mon, 2 Nov 2026 08:09:15 -0800 Subject: [PATCH] Dialogs: the Color Picker opens at its full height (#2129) A centred dialog window offers its body only last frame's height, and the Color Picker lays itself out on a fixed 566 x 334 canvas, so it opened clipped to its top strip behind a scrollbar: the colour field cut off, no value fields, no hex code, OK and Cancel visible but blind, and the window not resizable. The body's minimum scrolled height now covers the picker's canvas, as it already did for Numbering & Section Options. Verified locally on a288a87b: fmt, clippy, the picker's own tests; opened on macOS at full height. --- crates/ui-egui/src/dialogs.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index d546cd108..132d80a24 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -3016,9 +3016,16 @@ pub fn show(app: &mut DesignApp, ctx: &egui::Context) { result = Some(false); } } - // A centred window only offers its body last frame's height: let this one grow to its - // options' height (the screen still caps it). - let min_body = if side_actions { body_height.min(crate::section_options::BODY_H) } else { 1.0 }; + // A centred window only offers its body last frame's height: let these grow to their + // content's height (the screen still caps it). Numbering & Section Options has its + // options beside its buttons; the Color Picker lays itself out on a fixed canvas, which + // otherwise shows only its top strip (the field cut off, no values, no hex) behind a + // scrollbar. + let min_body = match d.id.as_str() { + "numberingSection" => body_height.min(crate::section_options::BODY_H), + "colorPicker" => body_height.min(picker_layout::SIZE.y + 2.0 * ui.spacing().item_spacing.y), + _ => 1.0, + }; egui::ScrollArea::both() .id_salt(("dialog_body", &d.id)) .min_scrolled_width(1.0)