Skip to content

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

style(keyframes): the pane wears the shared header, and its tools take a strip of their own

Jareera5f0696cf801
diff --git a/src/crates/concat/ui/icons.slint b/src/crates/concat/ui/icons.slint
index f232e280..39b6a4e1 100644
--- a/src/crates/concat/ui/icons.slint
+++ b/src/crates/concat/ui/icons.slint
@@ -56,6 +56,10 @@ export enum Glyph {
flip-h,
flip-v,
keyframe,
+ /// the Keyframes pane's two views: bars stepping down a sheet, and an
+ /// arc between two nodes
+ dopesheet,
+ curves,
reset,
hand,
/// the title strip's maximise: one square; restore is `copy`, two
@@ -432,6 +436,23 @@ export component Icon inherits Rectangle {
+ " 0Z";
}
+ // Three bars stepping down the frame, each starting where the last
+ // left off: a dopesheet's lanes, before any key is on them.
+ // lucide/chart-no-axes-gantt
+ if root.glyph == Glyph.dopesheet: Stroked {
+ size: root.size; tint: root.tint; weight: root.weight;
+ commands: "M6 5h12 M4 12h10 M12 19h8";
+ }
+
+ // A quarter arc between two nodes: one segment of a curve, with the key
+ // at either end of it. Lucide's circles are two half-arcs each.
+ // lucide/spline
+ if root.glyph == Glyph.curves: Stroked {
+ size: root.size; tint: root.tint; weight: root.weight;
+ commands: "M17 5a2 2 0 1 0 4 0a2 2 0 1 0 -4 0 M3 19a2 2 0 1 0 4 0a2 2 0 1 0"
+ + " -4 0 M5 17A12 12 0 0 1 17 5";
+ }
+
// Row height: a frame divided into rows. What the button changes is how
// many of them fit, which is what the divisions say.
// lucide/rows-3
diff --git a/src/crates/concat/ui/workspace/keyframes-pane.slint b/src/crates/concat/ui/workspace/keyframes-pane.slint
index 550e075f..54d28fe0 100644
--- a/src/crates/concat/ui/workspace/keyframes-pane.slint
+++ b/src/crates/concat/ui/workspace/keyframes-pane.slint
@@ -20,7 +20,7 @@ import { Select } from "../primitives/select.slint";
import { SegmentedControl } from "../primitives/segmented-control.slint";
import { InspectorFmt, Param, ParamFormat } from "../inspector/controls.slint";
import { ClipField, ClipKeyData, Keyframes, SelectedClipData } from "../timeline/model.slint";
-import { Pane } from "pane.slint";
+import { Pane, PaneHeader } from "pane.slint";
import { PaneKind, PaneSwitcher } from "pane-switcher.slint";
/// One key on a row: where in the clip, its value as a fraction of the
@@ -291,28 +291,54 @@ export component KeyframesPane inherits Pane {
VerticalLayout {
// ── header ──────────────────────────────────────────────────────
+ //
+ // The same bar as the other panes, and only what they carry in it:
+ // the name, and the switcher at the end. Everything that works the
+ // keys used to sit here too, and a row of seven things had a minimum
+ // width most seats fall under - the pane clips, and the first thing
+ // to go off the end was the switcher.
+ PaneHeader {
+ title: I18n.t("Keyframes");
+
+ VerticalLayout {
+ alignment: center;
+ PaneSwitcher {
+ kind: PaneKind.keyframes;
+ seat: root.pane-seat;
+ removable: root.pane-removable;
+ picked(kind) => { root.pane-picked(kind); }
+ removed => { root.pane-removed(); }
+ }
+ }
+ }
+
+ // ── the tools ───────────────────────────────────────────────────
+ //
+ // A strip of its own at the top of the body, the same 40px as the
+ // timeline's tray, which is the strip it most resembles: which view,
+ // the walk from key to key with the toggle between, the ease into
+ // the key in hand, and at the far end the one action that undoes
+ // the lot. The views are marks rather than words - the two are
+ // told apart at a glance, and the words stay as their names.
Rectangle {
height: 40px;
- background: Theme.panel;
Rectangle { x: 0; y: parent.height - 1px; width: parent.width; height: 1px; background: Theme.line; }
HorizontalLayout {
- padding-left: 12px;
+ padding-left: 8px;
padding-right: 8px;
spacing: 8px;
- alignment: stretch;
-
- Text {
- text: I18n.t("Keyframes");
- color: Theme.fg;
- font-size: Theme.fs;
- font-weight: 600;
- vertical-alignment: center;
- }
+
VerticalLayout {
alignment: center;
SegmentedControl {
+ // Two marks want no more room than two chips; a set
+ // width is fixed, so the control's own minimum,
+ // sized for words, does not apply.
+ width: 72px;
+ horizontal-stretch: 0;
options: [I18n.t("Dopesheet"), I18n.t("Curves")];
+ icons: [Glyph.dopesheet, Glyph.curves];
current: root.view;
changed(index) => { root.view = index; }
}
@@ -366,16 +392,6 @@ export component KeyframesPane inherits Pane {
clicked => { KeyEditor.clear-all(); }
}
}
- VerticalLayout {
- alignment: center;
- PaneSwitcher {
- kind: PaneKind.keyframes;
- seat: root.pane-seat;
- removable: root.pane-removable;
- picked(kind) => { root.pane-picked(kind); }
- removed => { root.pane-removed(); }
- }
- }
}
}