Keep collection panels and their fixed footers in their own viewport

(cherry picked from commit d69f9c041c)
(cherry picked from commit 20039d741c)
This commit is contained in:
Codex committed 2026-11-30 16:08:13 +01:00
1 parent 2b1d29e57a
commit 8a52ef43bb
1 file changed
+22 -8
+22 -8
View File
@@ -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),
}
}