From d69f9c041c09bfc43d3121ba2b8c0dfb2bcfc6a3 Mon Sep 17 00:00:00 2001 From: Codex Date: Mon, 30 Nov 2026 16:07:02 +0100 Subject: [PATCH] Keep collection panels and their fixed footers in their own viewport --- crates/ui-egui/src/dock.rs | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/crates/ui-egui/src/dock.rs b/crates/ui-egui/src/dock.rs index 6a70094ac2..dcff2191a4 100644 --- a/crates/ui-egui/src/dock.rs +++ b/crates/ui-egui/src/dock.rs @@ -15,14 +15,28 @@ pub(crate) fn panel_body(app: &mut VectorcraftApp, ui: &mut Ui, id: &str) { Some(DockTab::Properties) => panels::properties::show(app, ui), Some(DockTab::Layers) => panels::layers::show(app, ui), Some(DockTab::Libraries) => panels::libraries(app, ui), - None => { - // The dock clips the group at its assigned height. Keep the panel's own collection - // viewport bounded while allowing a form that exceeds that height to scroll. - let height = ui.available_height(); - Stack::new().id_salt(id).fill().scroll(Scroll::vertical()).show(ui, |ui, _| { - ui.set_max_height(height); - panels::show_icon_panel(app, ui, id); - }); + None if matches!( + id, + "align" + | "attributes" + | "blend" + | "character" + | "color" + | "magicWand" + | "openType" + | "paragraph" + | "pathfinder" + | "patternOptions" + | "stroke" + | "tabs" + | "transform" + | "transparency" + ) => + { + // These panels lay out forms. Collection panels own their scrolling viewport + // and reserve their own footer outside it. + Stack::new().id_salt(id).fill().scroll(Scroll::vertical()).show(ui, |ui, _| panels::show_icon_panel(app, ui, id)); } + None => panels::show_icon_panel(app, ui, id), } }