Skip to content

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

feat(inspector): Audio effects get their own page beside Audio's Basic

Jareer92070d137f6e
diff --git a/src/crates/concat/src/studio.rs b/src/crates/concat/src/studio.rs
index 46fa44c1..45ebac64 100644
--- a/src/crates/concat/src/studio.rs
+++ b/src/crates/concat/src/studio.rs
@@ -3770,7 +3770,7 @@ impl Studio {
self.inspector_jump = (
self.inspector_jump.0 + 1,
if video { "Effects" } else { "Audio" },
- if video { "Effects" } else { "Sound" },
+ if video { "Effects" } else { "AudioEffects" },
);
}
diff --git a/src/crates/concat/ui/phone/editor.slint b/src/crates/concat/ui/phone/editor.slint
index 992a3da4..f201b08b 100644
--- a/src/crates/concat/ui/phone/editor.slint
+++ b/src/crates/concat/ui/phone/editor.slint
@@ -251,6 +251,7 @@ export component PhoneEditor inherits Rectangle {
: name == "clip-video" ? I18n.t("phone.edit")
: name == "clip-speed" ? I18n.t("common.speed")
: name == "clip-audio" ? I18n.t("common.audio")
+ : name == "clip-audio-effects" ? I18n.t("configPane.audioEffects")
: name == "clip-adjust" ? I18n.t("common.adjust")
: name == "clip-enhance" ? I18n.t("common.enhance")
: name == "clip-layer" ? I18n.t("configPane.filter")
@@ -756,6 +757,14 @@ export component PhoneEditor inherits Rectangle {
current: root.sheet == "clip-audio";
clicked => { root.show("clip-audio", true); }
}
+ // The desk's Audio › Audio effects: the sound's chain and its
+ // library on a sheet of their own, not under the level.
+ if root.is-video || root.is-audio: ToolItem {
+ glyph: Glyph.waveform;
+ label: I18n.t("configPane.audioEffects");
+ current: root.sheet == "clip-audio-effects";
+ clicked => { root.show("clip-audio-effects", true); }
+ }
if root.is-picture: ToolItem {
glyph: Glyph.sun;
label: I18n.t("common.adjust");
@@ -1071,6 +1080,9 @@ export component PhoneEditor inherits Rectangle {
}
commit => { Editor.clip-commit(); }
}
+ }
+
+ if root.sheet == "clip-audio-effects": VerticalLayout {
PresetStack {
noun: I18n.t("common.audioEffect");
library-title: I18n.t("configPane.audioEffects");
diff --git a/src/crates/concat/ui/workspace/config-pane.slint b/src/crates/concat/ui/workspace/config-pane.slint
index d9c3eb0f..6b7de39a 100644
--- a/src/crates/concat/ui/workspace/config-pane.slint
+++ b/src/crates/concat/ui/workspace/config-pane.slint
@@ -275,8 +275,13 @@ export component ConfigPane inherits Rectangle {
/// The sections of the current tab, as the dropdown lists them.
property <[string]> sections: root.heading == "Video"
? (root.is-shape ? ["Basic"] : ["Basic", "Enhance", "Adjust"])
+ // Audio's chain library is a page of its own, beside the level,
+ // fades and treatments rather than under them, the way Video's
+ // Adjust sits beside its Basic. Named apart from Video's "Basic"
+ // and the Effects tab's "Effects", since `showing` picks the panel
+ // by this name alone.
: root.heading == "Audio"
- ? ["Sound"]
+ ? ["Sound", "AudioEffects"]
: root.heading == "Effects" ? ["Effects"]
: root.heading == "Text" ? ["Text"]
: ["Layer"];
@@ -285,7 +290,7 @@ export component ConfigPane inherits Rectangle {
? (root.is-shape ? [I18n.t("configPane.basic")]
: [I18n.t("configPane.basic"), I18n.t("common.enhance"), I18n.t("common.adjust")])
: root.heading == "Audio"
- ? [I18n.t("configPane.sound")]
+ ? [I18n.t("configPane.basic"), I18n.t("configPane.audioEffects")]
: root.heading == "Effects" ? [I18n.t("common.effects")]
: root.heading == "Text" ? [I18n.t("common.text")]
: [I18n.t("common.layer")];
@@ -322,8 +327,10 @@ export component ConfigPane inherits Rectangle {
if (root.jump-tab == "Video") { root.tab = 0; }
else if (root.jump-tab == "Audio") { root.tab = root.is-audio ? 0 : 1; }
else if (root.jump-tab == "Effects") { root.tab = root.tabs.length - 1; }
- // Enhance sits second in the Video tab for a video and a still alike.
- root.pick-section(root.jump-section == "Enhance" ? 1 : 0);
+ // Enhance sits second in the Video tab for a video and a still
+ // alike, and Audio effects second in the Audio tab.
+ root.pick-section(root.jump-section == "Enhance" || root.jump-section == "AudioEffects"
+ ? 1 : 0);
}
changed jump-token => { root.jump(); }
init => { root.jump(); }
@@ -716,6 +723,12 @@ export component ConfigPane inherits Rectangle {
}
commit => { root.clip-commit(); }
}
+ }
+
+ // The sound's chain and its library, on their own page
+ // rather than under everything Basic holds, where a long
+ // chain pushed the library off the bottom of the pane.
+ if root.showing == "AudioEffects": VerticalLayout {
PresetStack {
noun: I18n.t("common.audioEffect");
library-title: I18n.t("configPane.audioEffects");