Dock: keep the slot splitter at the edge column's width

A Fill-width splitter stretched the whole edge column across the
workspace when two slots were stacked, squeezing the drawing view.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013RyGiMXcsf9HTKfqDxaQGt
This commit is contained in:
Claude committed 2026-10-09 08:09:25 +00:00
1 parent 76883695c3
commit 089f572373
1 file changed
+9 -4
+9 -4
View File
@@ -2792,7 +2792,7 @@ impl OpenCADStudio {
let mut layers: Vec<Element<'_, Message>> = Vec::new();
for (n, gi) in expanded.iter().enumerate() {
if n > 0 {
layers.push(dock_splitter(side, expanded[n - 1], *gi));
layers.push(dock_splitter(side, expanded[n - 1], *gi, col_w));
}
let weight = self.dock.groups(side)[*gi].weight;
layers.push(
@@ -3505,12 +3505,14 @@ impl canvas::Program<Message> for VBarLabel {
/// Width of a collapsed (auto-collapsing) panel's tab in the edge strip.
const DOCK_RAIL_W: f32 = 28.0;
/// Width of the grabbable divider between a docked panel and the viewport.
const DOCK_DIVIDER_W: f32 = 5.0;
/// Grabbable separator for a docked panel managed by the general dock. Same
/// visual as the previous per-panel divider but emits generic dock messages.
fn dock_divider(id: crate::ui::dock::PanelId) -> Element<'static, Message> {
let line = container(Space::new())
.width(Length::Fixed(5.0))
.width(Length::Fixed(DOCK_DIVIDER_W))
.height(Fill)
.style(|theme: &Theme| container::Style {
background: Some(Background::Color(theme.palette().background.neutral.color)),
@@ -3598,14 +3600,17 @@ fn dock_tab_strip(
}
/// Draggable bar between two expanded slots on an edge; double-click gives
/// every slot on the edge the same height again.
/// every slot on the edge the same height again. It spans exactly the slots'
/// width (panel plus its divider): a `Fill` width would stretch the whole
/// edge column across the workspace and squeeze the drawing view.
fn dock_splitter(
side: crate::app::config::DockSide,
upper: usize,
lower: usize,
col_w: f32,
) -> Element<'static, Message> {
let line = container(Space::new())
.width(Fill)
.width(Length::Fixed(col_w + DOCK_DIVIDER_W))
.height(Length::Fixed(5.0))
.style(|theme: &Theme| container::Style {
background: Some(Background::Color(theme.palette().background.neutral.color)),