Skip to content

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

Inspector sections are a header and a spaced block

Jareereef4579e3744
diff --git a/engine/crates/concat/ui/inspector/clip-inspector.slint b/engine/crates/concat/ui/inspector/clip-inspector.slint
index 497fc736..0a5a5da0 100644
--- a/engine/crates/concat/ui/inspector/clip-inspector.slint
+++ b/engine/crates/concat/ui/inspector/clip-inspector.slint
@@ -3,7 +3,7 @@
import { Theme } from "../theme/theme.slint";
import { Glyph, Icon } from "../icons.slint";
-import { IconButton, Row, Section, SectionHeader } from "../primitives/panel.slint";
+import { IconButton, Row, Section, SectionBody, SectionHeader } from "../primitives/panel.slint";
import { SegmentedControl } from "../primitives/segmented-control.slint";
import { Select } from "../primitives/select.slint";
import {
@@ -401,7 +401,7 @@ export component VideoPanel inherits VerticalLayout {
}
}
- if transform.open: VerticalLayout {
+ if transform.open: SectionBody {
if root.transform-help: Note {
text: "Scale and position are fractions of the output frame, so a"
@@ -482,7 +482,7 @@ export component VideoPanel inherits VerticalLayout {
summary: "\{Math.round(root.alpha * 100)}% · "
+ root.blends[Math.max(0, Math.min(root.selected.blend, root.blends.length - 1))];
}
- if blend.open: VerticalLayout {
+ if blend.open: SectionBody {
Param {
label: "Opacity";
value <=> root.alpha;
@@ -527,7 +527,7 @@ export component VideoPanel inherits VerticalLayout {
toggled => { root.cutout-help = self.open; }
}
}
- if cutout.open: VerticalLayout {
+ if cutout.open: SectionBody {
if root.cutout-help: Note {
text: "Keys one colour out of the picture so what is beneath"
@@ -594,7 +594,7 @@ export component VideoPanel inherits VerticalLayout {
: "\{Math.round(root.crop-left * 100)} · \{Math.round(root.crop-top * 100)}"
+ " · \{Math.round(root.crop-right * 100)} · \{Math.round(root.crop-bottom * 100)}";
}
- if crop.open: VerticalLayout {
+ if crop.open: SectionBody {
Param {
label: "Left";
value <=> root.crop-left;
@@ -674,7 +674,8 @@ export component AudioPanel inherits VerticalLayout {
collapsible: true;
summary: InspectorFmt.format(ParamFormat.gain, root.level);
}
- if volume.open: Param {
+ if volume.open: SectionBody {
+ Param {
label: "Level";
value <=> root.level;
// The bottom is silence, not -60. +24 at the top because quiet
@@ -691,6 +692,7 @@ export component AudioPanel inherits VerticalLayout {
root.commit();
}
}
+ }
}
Section {
@@ -701,7 +703,7 @@ export component AudioPanel inherits VerticalLayout {
: InspectorFmt.format(ParamFormat.seconds2, root.fade-in)
+ " / " + InspectorFmt.format(ParamFormat.seconds2, root.fade-out);
}
- if fades.open: VerticalLayout {
+ if fades.open: SectionBody {
Param {
label: "Fade in";
value <=> root.fade-in;
@@ -755,7 +757,7 @@ export component SpeedPanel inherits VerticalLayout {
}
}
- if speed.open: VerticalLayout {
+ if speed.open: SectionBody {
if root.speed-help: Note {
text: "Rate re-times the clip in place, so the timeline length"
@@ -860,6 +862,7 @@ export component AnimationPanel inherits VerticalLayout {
toggled => { root.help = self.open; }
}
}
+ SectionBody {
if root.help: Note {
text: "In and Out play over the clip's first and last seconds;"
+ " Combo runs its whole length. Each moves the clip from"
@@ -883,10 +886,12 @@ export component AnimationPanel inherits VerticalLayout {
fmt: ParamFormat.seconds2;
changed(v) => { root.set(ClipField.anim-in-duration, v); root.commit(); }
}
+ }
}
Section {
SectionHeader { title: "Out"; }
+ SectionBody {
Row {
label: "Shape";
Select {
@@ -905,10 +910,12 @@ export component AnimationPanel inherits VerticalLayout {
fmt: ParamFormat.seconds2;
changed(v) => { root.set(ClipField.anim-out-duration, v); root.commit(); }
}
+ }
}
Section {
SectionHeader { title: "Combo"; }
+ SectionBody {
Row {
label: "Shape";
Select {
@@ -917,6 +924,7 @@ export component AnimationPanel inherits VerticalLayout {
changed(index) => { root.set(ClipField.anim-combo, index - 1); root.commit(); }
}
}
+ }
}
}
@@ -950,20 +958,22 @@ export component AdjustPanel inherits VerticalLayout {
}
// See PresetStack for why each row re-seeds its knob.
- for p in root.params: Rectangle {
- property <AppliedParamData> data: p;
- height: knob.preferred-height;
- changed data => { knob.value = self.data.value; }
-
- knob := Param {
- label: p.label;
- value: p.value;
- minimum: p.min;
- maximum: p.max;
- step: p.step;
- default-value: p.default-value;
- fmt: p.fmt;
- changed(v) => { root.set(p.key, v); root.commit(); }
+ SectionBody {
+ for p in root.params: Rectangle {
+ property <AppliedParamData> data: p;
+ height: knob.preferred-height;
+ changed data => { knob.value = self.data.value; }
+
+ knob := Param {
+ label: p.label;
+ value: p.value;
+ minimum: p.min;
+ maximum: p.max;
+ step: p.step;
+ default-value: p.default-value;
+ fmt: p.fmt;
+ changed(v) => { root.set(p.key, v); root.commit(); }
+ }
}
}
}
@@ -1018,7 +1028,7 @@ export component FilterPanel inherits VerticalLayout {
}
}
- if layer.open: VerticalLayout {
+ if layer.open: SectionBody {
if root.layer-help: Note {
text: "A layer treats everything under it for as long as it runs."
@@ -1047,7 +1057,7 @@ export component FilterPanel inherits VerticalLayout {
: InspectorFmt.format(ParamFormat.seconds2, root.fade-in)
+ " / " + InspectorFmt.format(ParamFormat.seconds2, root.fade-out);
}
- if ramps.open: VerticalLayout {
+ if ramps.open: SectionBody {
Param {
label: "Ramp in";
value <=> root.fade-in;
diff --git a/engine/crates/concat/ui/inspector/text-panel.slint b/engine/crates/concat/ui/inspector/text-panel.slint
index 734f295b..63b4aeb1 100644
--- a/engine/crates/concat/ui/inspector/text-panel.slint
+++ b/engine/crates/concat/ui/inspector/text-panel.slint
@@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2026 Jareer and Concat contributors
import { Theme } from "../theme/theme.slint";
-import { Section, SectionHeader, Row } from "../primitives/panel.slint";
+import { Row, Section, SectionBody, SectionHeader } from "../primitives/panel.slint";
import { SegmentedControl } from "../primitives/segmented-control.slint";
import { Select } from "../primitives/select.slint";
import {
@@ -75,7 +75,7 @@ export component TextPanel inherits VerticalLayout {
summary: root.selected.content == "" ? "Empty" : root.selected.content;
}
- if content.open: VerticalLayout {
+ if content.open: SectionBody {
padding-left: Theme.pad;
padding-right: Theme.pad;
padding-bottom: 4px;
@@ -125,7 +125,7 @@ export component TextPanel inherits VerticalLayout {
+ InspectorFmt.format(ParamFormat.height, root.size);
}
- if font.open: VerticalLayout {
+ if font.open: SectionBody {
Row {
Select {
options: root.families;
@@ -176,7 +176,7 @@ export component TextPanel inherits VerticalLayout {
+ InspectorFmt.format(ParamFormat.fraction, root.alpha);
}
- if colour.open: VerticalLayout {
+ if colour.open: SectionBody {
ColourField {
label: "Fill";
value: root.selected.fill;
@@ -258,7 +258,7 @@ export component TextPanel inherits VerticalLayout {
summary: InspectorFmt.format(ParamFormat.outline, root.stroke-width);
}
- if outline.open: VerticalLayout {
+ if outline.open: SectionBody {
Param {
label: "Width";
value <=> root.stroke-width;
@@ -294,7 +294,7 @@ export component TextPanel inherits VerticalLayout {
+ " · " + InspectorFmt.format(ParamFormat.rate, root.line-height);
}
- if layout.open: VerticalLayout {
+ if layout.open: SectionBody {
Row {
SegmentedControl {
options: ["Left", "Center", "Right"];
@@ -337,7 +337,7 @@ export component TextPanel inherits VerticalLayout {
+ " · " + InspectorFmt.format(ParamFormat.centred, root.offset-y);
}
- if position.open: VerticalLayout {
+ if position.open: SectionBody {
Param {
label: "Horizontal";
value <=> root.offset-x;
diff --git a/engine/crates/concat/ui/primitives/panel.slint b/engine/crates/concat/ui/primitives/panel.slint
index 651c9660..03f71395 100644
--- a/engine/crates/concat/ui/primitives/panel.slint
+++ b/engine/crates/concat/ui/primitives/panel.slint
@@ -147,6 +147,11 @@ export component SectionHeader inherits Rectangle {
}
export component SectionBody inherits VerticalLayout {
+ // Air between the header and the first row, and under the last, on top
+ // of the gap between rows: a section reads as a header and a block, not
+ // a header with rows jammed against it.
+ padding-top: 4px;
+ padding-bottom: 4px;
spacing: Theme.gap;
@children
}