Merge pull request #2160 from 4waymedia/fix/color-picker-clipped

Dialogs: the Color Picker opens at its full height (#2129)
This commit is contained in:
Brandon Thomas authored and GitHub committed 2026-11-02 23:23:42 -05:00
commit add101f2bd
1 file changed
+10 -3
+10 -3
View File
@@ -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)