Skip to content

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

The help mark sits level with its row and explains on hover

Jareer43373a138fd0
diff --git a/engine/crates/concat/ui/inspector/clip-inspector.slint b/engine/crates/concat/ui/inspector/clip-inspector.slint
index cfaa927c..1d6f79ad 100644
--- a/engine/crates/concat/ui/inspector/clip-inspector.slint
+++ b/engine/crates/concat/ui/inspector/clip-inspector.slint
@@ -207,7 +207,6 @@ export component PresetStack inherits VerticalLayout {
callback set-param(index: int, key: string, value: float);
callback commit();
- property <bool> help;
// The grid. Three columns at the inspector's width, which puts a tile at
// about 70px - wide enough for "Voice Focus" on two lines and narrow
@@ -260,15 +259,9 @@ export component PresetStack inherits VerticalLayout {
SectionHeader {
title: root.library-title;
- HelpButton {
- open: root.help;
- toggled => { root.help = self.open; }
- }
+ HelpButton { text: I18n.t("The chain runs top to bottom — reorder it with the chevrons. The eye bypasses one link without losing the values you dialled into it."); }
}
- if root.help: Note {
- text: I18n.t("The chain runs top to bottom — reorder it with the chevrons. The eye bypasses one link without losing the values you dialled into it.");
- }
if !root.library && root.applied.length == 0: Note {
text: root.empty-note;
@@ -903,8 +896,6 @@ export component VideoPanel inherits VerticalLayout {
init => { root.seed(); }
changed selected => { root.seed(); }
- property <bool> transform-help;
- property <bool> cutout-help;
Section {
first: true;
@@ -912,17 +903,11 @@ export component VideoPanel inherits VerticalLayout {
title: I18n.t("Transform");
collapsible: true;
summary: "\{Math.round(root.scale * 100)}% · \{Math.round(root.rotation)}°";
- HelpButton {
- open: root.transform-help;
- toggled => { root.transform-help = self.open; }
- }
+ HelpButton { text: I18n.t("Scale and position are fractions of the output frame, so a clip keeps its framing if the project is re-sized. The same numbers move with the box on the monitor. Width and height pull one axis beyond the scale; the edge grips on the monitor do the same."); }
}
if transform.open: SectionBody {
- if root.transform-help: Note {
- text: I18n.t("Scale and position are fractions of the output frame, so a clip keeps its framing if the project is re-sized. The same numbers move with the box on the monitor. Width and height pull one axis beyond the scale; the edge grips on the monitor do the same.");
- }
Param {
label: I18n.t("Scale");
@@ -1071,17 +1056,11 @@ export component VideoPanel inherits VerticalLayout {
summary: root.removal == 0 ? I18n.t("off")
: root.removal == 1 ? I18n.t("Auto removal")
: root.removal == 2 ? I18n.t("Custom removal") : I18n.t("Chroma key");
- HelpButton {
- open: root.cutout-help;
- toggled => { root.cutout-help = self.open; }
- }
+ HelpButton { text: I18n.t("Auto removal keeps what the model finds and drops the rest: a person, or the one thing the picture is of. Custom removal starts from the same mask and takes corrections painted on the monitor: the smart brush keeps the whole thing it touches and the smart eraser removes it, the plain ones do exactly what you paint; Apply ends the painting. Chroma key drops one colour instead; similarity is how far from the colour still counts, softness feathers the edge."); }
}
if cutout.open: SectionBody {
- if root.cutout-help: Note {
- text: I18n.t("Auto removal keeps what the model finds and drops the rest: a person, or the one thing the picture is of. Custom removal starts from the same mask and takes corrections painted on the monitor: the smart brush keeps the whole thing it touches and the smart eraser removes it, the plain ones do exactly what you paint; Apply ends the painting. Chroma key drops one colour instead; similarity is how far from the colour still counts, softness feathers the edge.");
- }
RemovalBlock {
title: I18n.t("Auto removal");
@@ -1456,7 +1435,6 @@ export component SpeedPanel inherits VerticalLayout {
init => { root.seed(); }
changed selected => { root.seed(); }
- property <bool> speed-help;
/// The Select's rows: the constant rate first, then the shapes in the
/// order Rust keeps them, then Custom for a shape that is none of them.
property <[string]> curves: [
@@ -1477,17 +1455,11 @@ export component SpeedPanel inherits VerticalLayout {
title: I18n.t("Speed");
collapsible: true;
summary: InspectorFmt.format(ParamFormat.rate, root.speed);
- HelpButton {
- open: root.speed-help;
- toggled => { root.speed-help = self.open; }
- }
+ HelpButton { text: I18n.t("Rate re-times the clip in place, so the timeline length changes with it. Trim afterwards, not before. A curve varies the rate over the clip; the same footage plays, faster here and slower there."); }
}
if speed.open: SectionBody {
- if root.speed-help: Note {
- text: I18n.t("Rate re-times the clip in place, so the timeline length changes with it. Trim afterwards, not before. A curve varies the rate over the clip; the same footage plays, faster here and slower there.");
- }
Row {
label: I18n.t("Curve");
@@ -1599,22 +1571,15 @@ export component AnimationPanel inherits VerticalLayout {
/// The longest a head or tail shape may take: half the clip, so the
/// two cannot cross.
property <float> limit: Math.max(0.1, Math.min(10, root.selected.duration / 2));
- property <bool> help;
Section {
first: true;
SectionHeader {
title: I18n.t("In");
- HelpButton {
- open: root.help;
- toggled => { root.help = self.open; }
- }
+ HelpButton { text: I18n.t("In and Out play over the clip's first and last seconds; Combo runs its whole length. Each moves the clip from where you placed it, so position it first."); }
}
SectionBody {
- if root.help: Note {
- text: I18n.t("In and Out play over the clip's first and last seconds; Combo runs its whole length. Each moves the clip from where you placed it, so position it first.");
- }
Row {
label: I18n.t("Shape");
Select {
@@ -1696,21 +1661,14 @@ export component AdjustPanel inherits VerticalLayout {
callback set(key: string, value: float);
callback commit();
- property <bool> help;
Section {
first: true;
SectionHeader {
title: I18n.t("Adjust");
- HelpButton {
- open: root.help;
- toggled => { root.help = self.open; }
- }
+ HelpButton { text: I18n.t("Exposure is in stops; the rest is a signed percent of the picture as shot, and zero everywhere is the picture as shot. Double-click a label to put it back; the diamond keys the knob at the playhead."); }
}
- if root.help: Note {
- text: I18n.t("Exposure is in stops; the rest is a signed percent of the picture as shot, and zero everywhere is the picture as shot. Double-click a label to put it back; the diamond keys the knob at the playhead.");
- }
// See PresetStack for why each row re-seeds its knob. A subhead
// opens each run of rows that share a group.
@@ -1788,7 +1746,6 @@ export component FilterPanel inherits VerticalLayout {
init => { root.seed(); }
changed selected => { root.seed(); }
- property <bool> layer-help;
Section {
first: true;
@@ -1796,17 +1753,11 @@ export component FilterPanel inherits VerticalLayout {
title: I18n.t("Layer");
collapsible: true;
summary: InspectorFmt.format(ParamFormat.fraction, root.strength);
- HelpButton {
- open: root.layer-help;
- toggled => { root.layer-help = self.open; }
- }
+ HelpButton { text: I18n.t("A layer treats everything under it for as long as it runs. Trim it on the timeline to change what it covers."); }
}
if layer.open: SectionBody {
- if root.layer-help: Note {
- text: I18n.t("A layer treats everything under it for as long as it runs. Trim it on the timeline to change what it covers.");
- }
Param {
label: I18n.t("Strength");
diff --git a/engine/crates/concat/ui/inspector/controls.slint b/engine/crates/concat/ui/inspector/controls.slint
index 6ecd1e38..70b148a0 100644
--- a/engine/crates/concat/ui/inspector/controls.slint
+++ b/engine/crates/concat/ui/inspector/controls.slint
@@ -587,36 +587,58 @@ export component SwitchRow inherits HorizontalLayout {
}
}
-// A tooltip would hide the answer again the moment the pointer moves; this
-// toggles a line of prose the caller renders where it belongs.
+// A "?" that explains on hover. The prose is a popover beside the mark, so
+// it never rearranges the panel it sits in, and it goes when the pointer
+// does. The mark has no height of its own: it fills whatever row it is
+// given and sits in the middle of it, which is what keeps it level with a
+// title or a switch rather than floating at the top of the row.
export component HelpButton inherits Rectangle {
- in-out property <bool> open;
-
- callback toggled();
+ /// The sentence or two the popover shows.
+ in property <string> text;
width: 16px;
- height: 16px;
- border-radius: 8px;
- background: root.open ? Theme.accent-soft
- : touch.has-hover ? Theme.field-hover
- : Theme.field;
-
- animate background { duration: 100ms; easing: cubic-bezier(0.4, 0, 0.2, 1); }
- Text {
- x: (parent.width - self.width) / 2;
+ mark := Rectangle {
+ x: 0;
y: (parent.height - self.height) / 2;
- text: "?";
- color: root.open ? Theme.accent : Theme.fg-muted;
- font-size: Theme.fs-xs;
- font-weight: Theme.weight-title;
- }
+ width: 16px;
+ height: 16px;
+ border-radius: 8px;
+ background: touch.has-hover ? Theme.accent-soft : Theme.field;
- touch := TouchArea {
- mouse-cursor: pointer;
- clicked => {
- root.open = !root.open;
- root.toggled();
+ animate background { duration: 100ms; easing: cubic-bezier(0.4, 0, 0.2, 1); }
+
+ Text {
+ x: (parent.width - self.width) / 2;
+ y: (parent.height - self.height) / 2;
+ text: "?";
+ color: touch.has-hover ? Theme.accent : Theme.fg-muted;
+ font-size: Theme.fs-xs;
+ font-weight: Theme.weight-title;
+ }
+
+ touch := TouchArea {
+ mouse-cursor: help;
+ }
+
+ Tooltip {
+ Rectangle {
+ width: 260px;
+ background: Theme.raised;
+ border-width: 1px;
+ border-color: Theme.line-strong;
+ border-radius: Theme.r;
+
+ HorizontalLayout {
+ padding: 10px;
+ Text {
+ text: root.text;
+ color: Theme.fg;
+ font-size: Theme.fs-sm;
+ wrap: word-wrap;
+ }
+ }
+ }
}
}
}
diff --git a/engine/crates/concat/ui/inspector/text-panel.slint b/engine/crates/concat/ui/inspector/text-panel.slint
index 2ea02470..f349a8db 100644
--- a/engine/crates/concat/ui/inspector/text-panel.slint
+++ b/engine/crates/concat/ui/inspector/text-panel.slint
@@ -64,8 +64,6 @@ export component TextPanel inherits VerticalLayout {
init => { root.seed(); }
changed selected => { root.seed(); }
- property <bool> shadow-help;
- property <bool> plate-help;
// ── content ──────────────────────────────────────────────────────────
Section {
@@ -204,26 +202,16 @@ export component TextPanel inherits VerticalLayout {
label: I18n.t("Drop shadow");
checked: root.selected.shadow;
- HelpButton {
- open: root.shadow-help;
- toggled => { root.shadow-help = self.open; }
- }
+ HelpButton { text: I18n.t("A soft shadow under the words, for titles that have to sit over footage you do not control."); }
toggled(on) => { root.set(ClipField.shadow, on ? 1 : 0); root.commit(); }
}
- if root.shadow-help: Note {
- text: I18n.t("A soft shadow under the words, for titles that have to sit over footage you do not control.");
- }
-
SwitchRow {
label: I18n.t("Plate");
checked: root.selected.plated;
- HelpButton {
- open: root.plate-help;
- toggled => { root.plate-help = self.open; }
- }
+ HelpButton { text: I18n.t("A solid band behind the words. Where a shadow softens the background, a plate replaces it — use it when the footage underneath is busy enough that neither weight nor outline will hold."); }
toggled(on) => {
// A plate is a colour, not a flag: turning it off is clearing
@@ -234,10 +222,6 @@ export component TextPanel inherits VerticalLayout {
}
}
- if root.plate-help: Note {
- text: I18n.t("A solid band behind the words. Where a shadow softens the background, a plate replaces it — use it when the footage underneath is busy enough that neither weight nor outline will hold.");
- }
-
if root.selected.plated: ColourField {
label: I18n.t("Plate colour");
value: root.selected.plate;