Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

feat(workspace): a fresh window opens with the inspector down the whole right side

Jareer3a19d1e23e41
diff --git a/src/crates/concat/src/dock.rs b/src/crates/concat/src/dock.rs
index ddcea79b..806a068b 100644
--- a/src/crates/concat/src/dock.rs
+++ b/src/crates/concat/src/dock.rs
@@ -254,29 +254,32 @@ pub fn lay_out(node: &Dock, (x, y, w, h): (f32, f32, f32, f32), out: &mut DockLa
}
}
-/// The arrangement the editor opens with: the library, the monitor and the
-/// inspector across the top, the timeline along the bottom. The same three
-/// shares the fixed layout carried, re-expressed as a tree — 0.31 of the width
-/// to the library and 0.22 to the inspector, which is 0.319 of what is left
-/// once the library has had its share.
+/// The arrangement the editor opens with: the inspector a column down the
+/// whole right side, and in the rest the library and the monitor across the
+/// top and the timeline under both of them. The inspector is the tallest
+/// thing in the window - a stack of sections that would otherwise scroll -
+/// and the timeline gives up its right end to it, which is the end with
+/// nothing on it yet. About 0.22 of the width to the inspector and 0.25 to
+/// the library, which is 0.32 of what is left once the inspector has had
+/// its share; the timeline takes the lower 0.4 of the height.
pub fn default_dock() -> Dock {
Dock::Split {
- columns: false,
- ratio: 0.6,
+ columns: true,
+ ratio: 0.78,
first: Box::new(Dock::Split {
- columns: true,
- ratio: 0.31,
- first: Dock::leaf(PaneKind::Media),
- second: Box::new(Dock::Split {
+ columns: false,
+ ratio: 0.6,
+ first: Box::new(Dock::Split {
columns: true,
- ratio: 0.681,
- first: Dock::leaf(PaneKind::Preview),
- second: Dock::leaf(PaneKind::Inspector),
+ ratio: 0.32,
+ first: Dock::leaf(PaneKind::Media),
+ second: Dock::leaf(PaneKind::Preview),
}),
+ // The timeline, whose VU meters are a column at its own right
+ // edge (see vu-meter.slint) rather than a seat of their own.
+ second: Dock::leaf(PaneKind::Timeline),
}),
- // The timeline, whose VU meters are a column at its own right edge
- // (see vu-meter.slint) rather than a seat of their own.
- second: Dock::leaf(PaneKind::Timeline),
+ second: Dock::leaf(PaneKind::Inspector),
}
}