Skip to content

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

fix: what review found in today's transition knobs and phone shelf pills (#415)

Jareerd4ced41fae0a
diff --git a/src/crates/concat-project/src/commands/mod.rs b/src/crates/concat-project/src/commands/mod.rs
index 078088fb..88727558 100644
--- a/src/crates/concat-project/src/commands/mod.rs
+++ b/src/crates/concat-project/src/commands/mod.rs
@@ -1093,7 +1093,7 @@ impl Command {
.transition_in
.iter()
.flatten()
- .any(|tr| bad([tr.duration]))
+ .any(|tr| bad([tr.duration]) || tr.params.values().any(|v| !v.is_finite()))
|| matches!(
patch.background,
Some(Some(Background::Blur { amount })) if !amount.is_finite()
diff --git a/src/crates/concat-project/src/model.rs b/src/crates/concat-project/src/model.rs
index 88e97d6f..b2fb41b1 100644
--- a/src/crates/concat-project/src/model.rs
+++ b/src/crates/concat-project/src/model.rs
@@ -2031,6 +2031,9 @@ impl Clip {
self.stabilize = self.stabilize.take().map(Stabilize::tidy);
if let Some(transition) = self.transition_in.as_mut() {
transition.duration = finite(transition.duration, 1.0).max(MIN_TRANSITION);
+ // A knob that is not a number would save as null and make the
+ // project unreadable: it goes, and the knob is at its default.
+ transition.params.retain(|_, value| value.is_finite());
}
self.keys
.retain(|key| (0.0..=1.0).contains(&key.at) && key.value.is_finite());
diff --git a/src/crates/concat/locales/ar.json b/src/crates/concat/locales/ar.json
index bbe31f48..ab9a1a8b 100644
--- a/src/crates/concat/locales/ar.json
+++ b/src/crates/concat/locales/ar.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "إنهاء دون حفظ؟",
"common.aboutLeft": "بقي نحو {0}:{1}",
"common.adjust": "ضبط",
+ "common.all": "الكل",
"common.apply": "تطبيق",
"common.audio": "الصوت",
"common.audioEffect": "تأثير صوتي",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "أصبح {0} بلا مفتاح الآن",
"sounds.addedMany": "أُضيف {0} أصوات إلى مكتبتك",
"sounds.addedOne": "أُضيف صوت إلى مكتبتك",
- "sounds.all": "الكل",
"sounds.catAmbience": "أجواء",
"sounds.catImpact": "ارتطام",
"sounds.catMusic": "موسيقى",
diff --git a/src/crates/concat/locales/bn.json b/src/crates/concat/locales/bn.json
index 265f305e..82d4c22f 100644
--- a/src/crates/concat/locales/bn.json
+++ b/src/crates/concat/locales/bn.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "সংরক্ষণ না করে বন্ধ করবেন?",
"common.aboutLeft": "আর প্রায় {0}:{1} বাকি",
"common.adjust": "সমন্বয় করুন",
+ "common.all": "সব",
"common.apply": "প্রয়োগ করুন",
"common.audio": "অডিও",
"common.audioEffect": "অডিও ইফেক্ট",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0}-এর এখন কোনো কী নেই",
"sounds.addedMany": "আপনার লাইব্রেরিতে {0}টি সাউন্ড যোগ হয়েছে",
"sounds.addedOne": "আপনার লাইব্রেরিতে একটি সাউন্ড যোগ হয়েছে",
- "sounds.all": "সব",
"sounds.catAmbience": "পরিবেশ",
"sounds.catImpact": "ইমপ্যাক্ট",
"sounds.catMusic": "সংগীত",
diff --git a/src/crates/concat/locales/de.json b/src/crates/concat/locales/de.json
index 9b4a06b0..aae8dd7d 100644
--- a/src/crates/concat/locales/de.json
+++ b/src/crates/concat/locales/de.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "Ohne Speichern beenden?",
"common.aboutLeft": "Noch etwa {0}:{1}",
"common.adjust": "Anpassen",
+ "common.all": "Alle",
"common.apply": "Anwenden",
"common.audio": "Audio",
"common.audioEffect": "Audioeffekt",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} ist jetzt nicht belegt",
"sounds.addedMany": "{0} Sounds wurden deiner Bibliothek hinzugefügt",
"sounds.addedOne": "Ein Sound wurde deiner Bibliothek hinzugefügt",
- "sounds.all": "Alle",
"sounds.catAmbience": "Atmo",
"sounds.catImpact": "Aufprall",
"sounds.catMusic": "Musik",
diff --git a/src/crates/concat/locales/en.json b/src/crates/concat/locales/en.json
index ee41498e..7e0cd2f5 100644
--- a/src/crates/concat/locales/en.json
+++ b/src/crates/concat/locales/en.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "Quit without saving?",
"common.aboutLeft": "About {0}:{1} left",
"common.adjust": "Adjust",
+ "common.all": "All",
"common.apply": "Apply",
"common.audio": "Audio",
"common.audioEffect": "audio effect",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} is unbound now",
"sounds.addedMany": "Added {0} sounds to your library",
"sounds.addedOne": "Added a sound to your library",
- "sounds.all": "All",
"sounds.catAmbience": "Ambience",
"sounds.catImpact": "Impact",
"sounds.catMusic": "Music",
diff --git a/src/crates/concat/locales/es.json b/src/crates/concat/locales/es.json
index 94936863..20df3b51 100644
--- a/src/crates/concat/locales/es.json
+++ b/src/crates/concat/locales/es.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "¿Salir sin guardar?",
"common.aboutLeft": "Quedan unos {0}:{1}",
"common.adjust": "Ajustar",
+ "common.all": "Todo",
"common.apply": "Aplicar",
"common.audio": "Audio",
"common.audioEffect": "efecto de audio",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} ya no tiene tecla",
"sounds.addedMany": "Se añadieron {0} sonidos a tu biblioteca",
"sounds.addedOne": "Se añadió un sonido a tu biblioteca",
- "sounds.all": "Todos",
"sounds.catAmbience": "Ambiente",
"sounds.catImpact": "Impactos",
"sounds.catMusic": "Música",
diff --git a/src/crates/concat/locales/fa.json b/src/crates/concat/locales/fa.json
index bf983ddf..445d0906 100644
--- a/src/crates/concat/locales/fa.json
+++ b/src/crates/concat/locales/fa.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "خروج بدون ذخیره؟",
"common.aboutLeft": "حدود {0}:{1} مانده",
"common.adjust": "تنظیم",
+ "common.all": "همه",
"common.apply": "اعمال",
"common.audio": "صدا",
"common.audioEffect": "صدا افکت",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} اکنون بدون کلید است",
"sounds.addedMany": "{0} صدا به کتابخانه‌تان اضافه شد",
"sounds.addedOne": "یک صدا به کتابخانه‌تان اضافه شد",
- "sounds.all": "همه",
"sounds.catAmbience": "فضا",
"sounds.catImpact": "ضربه",
"sounds.catMusic": "موسیقی",
diff --git a/src/crates/concat/locales/fr.json b/src/crates/concat/locales/fr.json
index c9c90019..39cb2523 100644
--- a/src/crates/concat/locales/fr.json
+++ b/src/crates/concat/locales/fr.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "Quitter sans enregistrer ?",
"common.aboutLeft": "Encore environ {0}:{1}",
"common.adjust": "Réglages",
+ "common.all": "Tout",
"common.apply": "Appliquer",
"common.audio": "Audio",
"common.audioEffect": "effet audio",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} n'a plus de touche",
"sounds.addedMany": "{0} sons ont été ajoutés à votre bibliothèque",
"sounds.addedOne": "Un son a été ajouté à votre bibliothèque",
- "sounds.all": "Tous",
"sounds.catAmbience": "Ambiance",
"sounds.catImpact": "Impact",
"sounds.catMusic": "Musique",
diff --git a/src/crates/concat/locales/he.json b/src/crates/concat/locales/he.json
index c8497b4b..205cf33a 100644
--- a/src/crates/concat/locales/he.json
+++ b/src/crates/concat/locales/he.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "לצאת ללא שמירה?",
"common.aboutLeft": "נותרו כ-{0}:{1}",
"common.adjust": "כוונון",
+ "common.all": "הכול",
"common.apply": "החלה",
"common.audio": "שמע",
"common.audioEffect": "אפקט שמע",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} נשאר עכשיו בלי מקש",
"sounds.addedMany": "{0} צלילים נוספו לספרייה שלכם",
"sounds.addedOne": "צליל נוסף לספרייה שלכם",
- "sounds.all": "הכול",
"sounds.catAmbience": "אווירה",
"sounds.catImpact": "חבטה",
"sounds.catMusic": "מוזיקה",
diff --git a/src/crates/concat/locales/hi.json b/src/crates/concat/locales/hi.json
index 240994bf..24d6b832 100644
--- a/src/crates/concat/locales/hi.json
+++ b/src/crates/concat/locales/hi.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "सेव किए बिना बंद करें?",
"common.aboutLeft": "लगभग {0}:{1} बाकी",
"common.adjust": "समायोजन",
+ "common.all": "सभी",
"common.apply": "लागू करें",
"common.audio": "ऑडियो",
"common.audioEffect": "ऑडियो इफ़ेक्ट",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} की अब कोई कुंजी नहीं है",
"sounds.addedMany": "आपकी लाइब्रेरी में {0} साउंड जोड़े गए",
"sounds.addedOne": "आपकी लाइब्रेरी में एक साउंड जोड़ा गया",
- "sounds.all": "सभी",
"sounds.catAmbience": "माहौल",
"sounds.catImpact": "प्रहार",
"sounds.catMusic": "संगीत",
diff --git a/src/crates/concat/locales/hr.json b/src/crates/concat/locales/hr.json
index b582bfd2..a18c74c4 100644
--- a/src/crates/concat/locales/hr.json
+++ b/src/crates/concat/locales/hr.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "Izaći bez spremanja?",
"common.aboutLeft": "Još oko {0}:{1}",
"common.adjust": "Prilagodi",
+ "common.all": "Sve",
"common.apply": "Primijeni",
"common.audio": "Zvuk",
"common.audioEffect": "zvučni efekt",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} više nema tipku",
"sounds.addedMany": "Dodano je {0} zvukova u vašu knjižnicu",
"sounds.addedOne": "Zvuk je dodan u vašu knjižnicu",
- "sounds.all": "Sve",
"sounds.catAmbience": "Ambijent",
"sounds.catImpact": "Udarac",
"sounds.catMusic": "Glazba",
diff --git a/src/crates/concat/locales/id.json b/src/crates/concat/locales/id.json
index cb75590b..358469f3 100644
--- a/src/crates/concat/locales/id.json
+++ b/src/crates/concat/locales/id.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "Keluar tanpa menyimpan?",
"common.aboutLeft": "Sekitar {0}:{1} lagi",
"common.adjust": "Sesuaikan",
+ "common.all": "Semua",
"common.apply": "Terapkan",
"common.audio": "Audio",
"common.audioEffect": "efek audio",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} kini tidak punya tombol",
"sounds.addedMany": "{0} suara ditambahkan ke pustakamu",
"sounds.addedOne": "Satu suara ditambahkan ke pustakamu",
- "sounds.all": "Semua",
"sounds.catAmbience": "Suasana",
"sounds.catImpact": "Benturan",
"sounds.catMusic": "Musik",
diff --git a/src/crates/concat/locales/it.json b/src/crates/concat/locales/it.json
index 66a5c273..f888a0af 100644
--- a/src/crates/concat/locales/it.json
+++ b/src/crates/concat/locales/it.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "Uscire senza salvare?",
"common.aboutLeft": "Mancano circa {0}:{1}",
"common.adjust": "Regola",
+ "common.all": "Tutto",
"common.apply": "Applica",
"common.audio": "Audio",
"common.audioEffect": "effetto audio",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} non ha più un tasto",
"sounds.addedMany": "Aggiunti {0} suoni alla tua libreria",
"sounds.addedOne": "Aggiunto un suono alla tua libreria",
- "sounds.all": "Tutti",
"sounds.catAmbience": "Ambiente",
"sounds.catImpact": "Impatto",
"sounds.catMusic": "Musica",
diff --git a/src/crates/concat/locales/ja.json b/src/crates/concat/locales/ja.json
index 704ef2a0..304d48d4 100644
--- a/src/crates/concat/locales/ja.json
+++ b/src/crates/concat/locales/ja.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "保存せずに終了しますか?",
"common.aboutLeft": "残り約 {0}:{1}",
"common.adjust": "調整",
+ "common.all": "すべて",
"common.apply": "適用",
"common.audio": "オーディオ",
"common.audioEffect": "オーディオエフェクト",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} は現在割り当てされていません",
"sounds.addedMany": "{0} 個のサウンドをライブラリに追加しました",
"sounds.addedOne": "サウンドをライブラリに追加しました",
- "sounds.all": "すべて",
"sounds.catAmbience": "環境音",
"sounds.catImpact": "インパクト",
"sounds.catMusic": "音楽",
diff --git a/src/crates/concat/locales/ko.json b/src/crates/concat/locales/ko.json
index b1594786..d7475b41 100644
--- a/src/crates/concat/locales/ko.json
+++ b/src/crates/concat/locales/ko.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "저장하지 않고 끝낼까요?",
"common.aboutLeft": "약 {0}:{1} 남음",
"common.adjust": "조정",
+ "common.all": "전체",
"common.apply": "적용",
"common.audio": "오디오",
"common.audioEffect": "오디오 효과",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0}에 키가 없습니다",
"sounds.addedMany": "라이브러리에 사운드 {0}개를 추가했습니다",
"sounds.addedOne": "라이브러리에 사운드를 추가했습니다",
- "sounds.all": "전체",
"sounds.catAmbience": "앰비언스",
"sounds.catImpact": "임팩트",
"sounds.catMusic": "음악",
diff --git a/src/crates/concat/locales/nl.json b/src/crates/concat/locales/nl.json
index 5a36b775..052674d5 100644
--- a/src/crates/concat/locales/nl.json
+++ b/src/crates/concat/locales/nl.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "Stoppen zonder op te slaan?",
"common.aboutLeft": "Nog ongeveer {0}:{1}",
"common.adjust": "Aanpassen",
+ "common.all": "Alles",
"common.apply": "Toepassen",
"common.audio": "Audio",
"common.audioEffect": "audio-effect",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} heeft nu geen toets",
"sounds.addedMany": "{0} geluiden aan je bibliotheek toegevoegd",
"sounds.addedOne": "Geluid aan je bibliotheek toegevoegd",
- "sounds.all": "Alle",
"sounds.catAmbience": "Sfeer",
"sounds.catImpact": "Inslag",
"sounds.catMusic": "Muziek",
diff --git a/src/crates/concat/locales/pl.json b/src/crates/concat/locales/pl.json
index 2686b7fd..df7ef68b 100644
--- a/src/crates/concat/locales/pl.json
+++ b/src/crates/concat/locales/pl.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "Zakończyć bez zapisywania?",
"common.aboutLeft": "Zostało około {0}:{1}",
"common.adjust": "Korekta",
+ "common.all": "Wszystko",
"common.apply": "Zastosuj",
"common.audio": "Audio",
"common.audioEffect": "efekt audio",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} nie ma teraz klawisza",
"sounds.addedMany": "Dodano dźwięki do Twojej biblioteki: {0}",
"sounds.addedOne": "Dodano dźwięk do Twojej biblioteki",
- "sounds.all": "Wszystkie",
"sounds.catAmbience": "Tło",
"sounds.catImpact": "Uderzenie",
"sounds.catMusic": "Muzyka",
diff --git a/src/crates/concat/locales/pt-BR.json b/src/crates/concat/locales/pt-BR.json
index 4ca18c6f..c01c2418 100644
--- a/src/crates/concat/locales/pt-BR.json
+++ b/src/crates/concat/locales/pt-BR.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "Sair sem salvar?",
"common.aboutLeft": "Faltam cerca de {0}:{1}",
"common.adjust": "Ajustar",
+ "common.all": "Tudo",
"common.apply": "Aplicar",
"common.audio": "Áudio",
"common.audioEffect": "efeito de áudio",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} não tem tecla agora",
"sounds.addedMany": "{0} sons foram adicionados à sua biblioteca",
"sounds.addedOne": "Um som foi adicionado à sua biblioteca",
- "sounds.all": "Todos",
"sounds.catAmbience": "Ambiente",
"sounds.catImpact": "Impacto",
"sounds.catMusic": "Música",
diff --git a/src/crates/concat/locales/ru.json b/src/crates/concat/locales/ru.json
index 5313767e..d08faa20 100644
--- a/src/crates/concat/locales/ru.json
+++ b/src/crates/concat/locales/ru.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "Выйти без сохранения?",
"common.aboutLeft": "Осталось около {0}:{1}",
"common.adjust": "Коррекция",
+ "common.all": "Все",
"common.apply": "Применить",
"common.audio": "Аудио",
"common.audioEffect": "аудиоэффект",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "Теперь у «{0}» нет клавиши",
"sounds.addedMany": "Звуков добавлено в вашу библиотеку: {0}",
"sounds.addedOne": "Звук добавлен в вашу библиотеку",
- "sounds.all": "Все",
"sounds.catAmbience": "Атмосфера",
"sounds.catImpact": "Удар",
"sounds.catMusic": "Музыка",
diff --git a/src/crates/concat/locales/th.json b/src/crates/concat/locales/th.json
index 22ebf750..1d36c4d1 100644
--- a/src/crates/concat/locales/th.json
+++ b/src/crates/concat/locales/th.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "ออกโดยไม่บันทึกไหม",
"common.aboutLeft": "เหลืออีกประมาณ {0}:{1}",
"common.adjust": "ปรับแต่ง",
+ "common.all": "ทั้งหมด",
"common.apply": "นำไปใช้",
"common.audio": "เสียง",
"common.audioEffect": "เอฟเฟกต์เสียง",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "ตอนนี้ {0} ไม่มีแป้นแล้ว",
"sounds.addedMany": "เพิ่ม {0} เสียงลงในคลังของคุณแล้ว",
"sounds.addedOne": "เพิ่มเสียงลงในคลังของคุณแล้ว",
- "sounds.all": "ทั้งหมด",
"sounds.catAmbience": "บรรยากาศ",
"sounds.catImpact": "กระแทก",
"sounds.catMusic": "เพลง",
diff --git a/src/crates/concat/locales/tr.json b/src/crates/concat/locales/tr.json
index 39a9ce63..8b2c90de 100644
--- a/src/crates/concat/locales/tr.json
+++ b/src/crates/concat/locales/tr.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "Kaydetmeden çıkılsın mı?",
"common.aboutLeft": "Yaklaşık {0}:{1} kaldı",
"common.adjust": "Ayarla",
+ "common.all": "Tümü",
"common.apply": "Uygula",
"common.audio": "Ses",
"common.audioEffect": "ses efekti",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} artık tuşsuz",
"sounds.addedMany": "Kitaplığınıza {0} ses eklendi",
"sounds.addedOne": "Kitaplığınıza bir ses eklendi",
- "sounds.all": "Tümü",
"sounds.catAmbience": "Ortam",
"sounds.catImpact": "Darbe",
"sounds.catMusic": "Müzik",
diff --git a/src/crates/concat/locales/uk.json b/src/crates/concat/locales/uk.json
index 6650ccd2..f74311a3 100644
--- a/src/crates/concat/locales/uk.json
+++ b/src/crates/concat/locales/uk.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "Вийти без збереження?",
"common.aboutLeft": "Залишилось близько {0}:{1}",
"common.adjust": "Корекція",
+ "common.all": "Усі",
"common.apply": "Застосувати",
"common.audio": "Аудіо",
"common.audioEffect": "аудіоефект",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "Тепер «{0}» не має клавіші",
"sounds.addedMany": "Звуків додано до вашої бібліотеки: {0}",
"sounds.addedOne": "Звук додано до вашої бібліотеки",
- "sounds.all": "Усі",
"sounds.catAmbience": "Атмосфера",
"sounds.catImpact": "Удар",
"sounds.catMusic": "Музика",
diff --git a/src/crates/concat/locales/ur.json b/src/crates/concat/locales/ur.json
index 525f90c5..f4ea69f8 100644
--- a/src/crates/concat/locales/ur.json
+++ b/src/crates/concat/locales/ur.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "محفوظ کیے بغیر بند کریں؟",
"common.aboutLeft": "تقریباً {0}:{1} باقی",
"common.adjust": "ایڈجسٹ",
+ "common.all": "سب",
"common.apply": "لاگو کریں",
"common.audio": "آڈیو",
"common.audioEffect": "آڈیو ایفیکٹ",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} کی اب کوئی کلید نہیں",
"sounds.addedMany": "آپ کی لائبریری میں {0} آوازیں شامل ہو گئیں",
"sounds.addedOne": "آپ کی لائبریری میں ایک آواز شامل ہو گئی",
- "sounds.all": "سب",
"sounds.catAmbience": "ماحول",
"sounds.catImpact": "ٹکر",
"sounds.catMusic": "موسیقی",
diff --git a/src/crates/concat/locales/vi.json b/src/crates/concat/locales/vi.json
index d9102d59..9d8307bb 100644
--- a/src/crates/concat/locales/vi.json
+++ b/src/crates/concat/locales/vi.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "Thoát mà không lưu?",
"common.aboutLeft": "Còn khoảng {0}:{1}",
"common.adjust": "Điều chỉnh",
+ "common.all": "Tất cả",
"common.apply": "Áp dụng",
"common.audio": "Âm thanh",
"common.audioEffect": "hiệu ứng âm thanh",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0} hiện không có phím",
"sounds.addedMany": "Đã thêm {0} âm thanh vào thư viện của bạn",
"sounds.addedOne": "Đã thêm một âm thanh vào thư viện của bạn",
- "sounds.all": "Tất cả",
"sounds.catAmbience": "Không khí",
"sounds.catImpact": "Va chạm",
"sounds.catMusic": "Nhạc",
diff --git a/src/crates/concat/locales/zh-Hans.json b/src/crates/concat/locales/zh-Hans.json
index 1401b0b7..e11c8143 100644
--- a/src/crates/concat/locales/zh-Hans.json
+++ b/src/crates/concat/locales/zh-Hans.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "不保存就退出?",
"common.aboutLeft": "还剩约 {0}:{1}",
"common.adjust": "调整",
+ "common.all": "全部",
"common.apply": "应用",
"common.audio": "音频",
"common.audioEffect": "音频效果",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0}现在没有按键",
"sounds.addedMany": "已将 {0} 个声音添加到你的资料库",
"sounds.addedOne": "已将一个声音添加到你的资料库",
- "sounds.all": "全部",
"sounds.catAmbience": "环境音",
"sounds.catImpact": "撞击",
"sounds.catMusic": "音乐",
diff --git a/src/crates/concat/locales/zh-TW.json b/src/crates/concat/locales/zh-TW.json
index 21c9763a..be919640 100644
--- a/src/crates/concat/locales/zh-TW.json
+++ b/src/crates/concat/locales/zh-TW.json
@@ -139,6 +139,7 @@
"close.unsavedTitle": "不儲存就結束?",
"common.aboutLeft": "約剩 {0}:{1}",
"common.adjust": "調整",
+ "common.all": "全部",
"common.apply": "套用",
"common.audio": "音訊",
"common.audioEffect": "音訊效果",
@@ -522,7 +523,6 @@
"shortcuts.unboundNow": "{0}目前沒有按鍵",
"sounds.addedMany": "已將 {0} 個聲音加入你的資料庫",
"sounds.addedOne": "已將一個聲音加入你的資料庫",
- "sounds.all": "全部",
"sounds.catAmbience": "環境音",
"sounds.catImpact": "撞擊",
"sounds.catMusic": "音樂",
diff --git a/src/crates/concat/src/launch.rs b/src/crates/concat/src/launch.rs
index 78487b87..654c3dc0 100644
--- a/src/crates/concat/src/launch.rs
+++ b/src/crates/concat/src/launch.rs
@@ -14,7 +14,7 @@ pub enum Launch {
/// The window, on the launch screen or on the project it names.
Normal(Option<PathBuf>),
/// The window on the launch screen, drawn in software from now on: what
- /// the Start menu's "Concat (software drawing)" runs, for a driver that
+ /// the Start menu's "Concat (safe graphics)" runs, for a driver that
/// draws the window as coloured squares, where Settings' GPU switch
/// cannot be seen to be turned off (#389, #242, #449).
Software,
diff --git a/src/crates/concat/src/lib.rs b/src/crates/concat/src/lib.rs
index fbe00af2..80b2027d 100644
--- a/src/crates/concat/src/lib.rs
+++ b/src/crates/concat/src/lib.rs
@@ -367,6 +367,8 @@ fn start(project: Option<std::path::PathBuf>, smoke: bool) -> Result<(), slint::
editor.set_applied_visual(ModelRc::from(models.applied_visual.clone()));
editor.set_applied_audio(ModelRc::from(models.applied_audio.clone()));
editor.set_visual_params(ModelRc::from(models.visual_params.clone()));
+ editor.set_transition_knobs(ModelRc::from(models.transition_knobs.clone()));
+ editor.set_transition_choices(ModelRc::from(models.transition_choices.clone()));
editor.set_audio_params(ModelRc::from(models.audio_params.clone()));
editor.set_adjust_params(ModelRc::from(models.adjust_params.clone()));
editor.set_adjust_wheels(ModelRc::from(models.adjust_wheels.clone()));
diff --git a/src/crates/concat/src/studio.rs b/src/crates/concat/src/studio.rs
index 01b8c5fe..01fa831d 100644
--- a/src/crates/concat/src/studio.rs
+++ b/src/crates/concat/src/studio.rs
@@ -633,6 +633,10 @@ pub struct Models {
pub applied_visual: Rc<VecModel<AppliedEntryData>>,
pub applied_audio: Rc<VecModel<AppliedEntryData>>,
pub visual_params: Rc<VecModel<AppliedParamData>>,
+ /// The selected transition's knobs, kept and synced like the chains'
+ /// so a row being dragged is not rebuilt under the finger.
+ pub transition_knobs: Rc<VecModel<AppliedParamData>>,
+ pub transition_choices: Rc<VecModel<crate::ui::TransitionChoiceData>>,
pub audio_params: Rc<VecModel<AppliedParamData>>,
/// The colour panel's knobs.
pub adjust_params: Rc<VecModel<AppliedParamData>>,
@@ -724,6 +728,8 @@ impl Models {
applied_visual: Rc::new(VecModel::default()),
applied_audio: Rc::new(VecModel::default()),
visual_params: Rc::new(VecModel::default()),
+ transition_knobs: Rc::new(VecModel::default()),
+ transition_choices: Rc::new(VecModel::default()),
audio_params: Rc::new(VecModel::default()),
adjust_params: Rc::new(VecModel::default()),
adjust_wheels: Rc::new(VecModel::default()),
@@ -4303,13 +4309,17 @@ impl Studio {
}
let mut params = existing.params.clone();
params.insert(key.to_owned(), value.clamp(param.min, param.max));
- self.apply(Command::UpdateClip {
- clip_id,
- patch: ClipPatch {
- transition_in: Some(Some(Transition { params, ..existing })),
- ..ClipPatch::default()
+ // One undo step a drag, not one a tick of it.
+ self.apply_within(
+ &format!("transition-knob:{clip_id}:{key}"),
+ Command::UpdateClip {
+ clip_id,
+ patch: ClipPatch {
+ transition_in: Some(Some(Transition { params, ..existing })),
+ ..ClipPatch::default()
+ },
},
- });
+ );
}
/// Sets `clip_id`'s transition to `seconds`, clamped to what the cut can
@@ -8841,6 +8851,12 @@ impl Studio {
/// The window is a phone's: the lanes keep the playhead at their middle
/// and glide under it. See `platform::phone` and `TimelinePane::centred`.
pub fn set_phone(&mut self, phone: bool) {
+ // A phone's Filters and Transitions sheets open on every shelf at
+ // once, under their All pill; a desk's strip starts on the first.
+ if phone {
+ self.library[0].group = -1;
+ self.library[3].group = -1;
+ }
self.lanes.centred = phone;
self.meters.phone = phone;
let playhead = self.playhead;
@@ -9041,8 +9057,8 @@ impl Studio {
editor.set_selected_clip(self.selected());
editor.set_selected_transition(self.selected_transition_data());
let (knobs, choices) = self.transition_knobs();
- editor.set_transition_knobs(ModelRc::new(VecModel::from(knobs)));
- editor.set_transition_choices(ModelRc::new(VecModel::from(choices)));
+ sync(&models.transition_knobs, knobs);
+ sync(&models.transition_choices, choices);
// The background and Fit and Fill, on their own global: the Details
// panel, the Video panel and the phone all read it.
self.publish_backdrop(app);
diff --git a/src/crates/concat/ui/workspace/media-pane.slint b/src/crates/concat/ui/workspace/media-pane.slint
index 652a80c6..a625ffad 100644
--- a/src/crates/concat/ui/workspace/media-pane.slint
+++ b/src/crates/concat/ui/workspace/media-pane.slint
@@ -1412,6 +1412,11 @@ component CategoryPill inherits Rectangle {
in property <string> text;
in property <bool> selected;
callback clicked();
+ /// A finger went down on the pill, then slid `dx` across the window
+ /// since: the strip's to scroll by. A pill takes the press, so the
+ /// strip under it never hears a drag that starts on one (#415).
+ callback drag-started();
+ callback dragged(dx: length);
height: 24px;
border-radius: 12px;
@@ -1438,8 +1443,35 @@ component CategoryPill inherits Rectangle {
}
touch := TouchArea {
+ // Measured across the window, not the pill: the strip moves the
+ // pill along with the finger, and the pill's own coordinates would
+ // read the slide as no slide at all.
+ property <length> start;
+ property <bool> slid;
mouse-cursor: pointer;
- clicked => { root.clicked(); }
+ pointer-event(event) => {
+ if (event.kind == PointerEventKind.down) {
+ self.start = root.absolute-position.x + self.mouse-x;
+ self.slid = false;
+ root.drag-started();
+ }
+ }
+ moved => {
+ if (self.pressed) {
+ let dx = root.absolute-position.x + self.mouse-x - self.start;
+ if (Math.abs(dx) > 8px) {
+ self.slid = true;
+ }
+ if (self.slid) {
+ root.dragged(dx);
+ }
+ }
+ }
+ clicked => {
+ if (!self.slid) {
+ root.clicked();
+ }
+ }
}
}
@@ -1489,6 +1521,10 @@ export component CategoryPillBar inherits Rectangle {
spacing: 6px;
for cat in root.categories: CategoryPill {
+ drag-started => { root.press-offset = root.offset; }
+ dragged(dx) => {
+ root.offset = Math.max(-root.max-scroll, Math.min(0px, root.press-offset + dx));
+ }
text: cat;
selected: root.current == cat || (root.current == "" && cat == "All" && Library.view(1).group < 0);
clicked => {
@@ -1541,11 +1577,19 @@ export component GroupPillBar inherits Rectangle {
spacing: 6px;
CategoryPill {
- text: I18n.t("sounds.all");
+ text: I18n.t("common.all");
selected: root.current < 0;
clicked => { Library.group-changed(root.shelf, -1); }
+ drag-started => { root.press-offset = root.offset; }
+ dragged(dx) => {
+ root.offset = Math.max(-root.max-scroll, Math.min(0px, root.press-offset + dx));
+ }
}
for label[index] in root.groups: CategoryPill {
+ drag-started => { root.press-offset = root.offset; }
+ dragged(dx) => {
+ root.offset = Math.max(-root.max-scroll, Math.min(0px, root.press-offset + dx));
+ }
text: label;
selected: root.current == index;
clicked => { Library.group-changed(root.shelf, index); }