The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.
Rust ffmpegfree-video-editormodel-context-protocolnon-linear-editoroffline-firstopen-source-video-editorself-hostedvideo-editingvideo-editing-automationvideo-editing-softwarevideo-editing-toolsvideo-editorvoice-cloningyoutube-automationyoutube-shorts
feat(start): the launch screen is a grid of projects, and the form is a sheet its first card opens
Jareer146caee4fc28
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.mdindex 51cccb6d..cd6e3467 100644--- a/ARCHITECTURE.md+++ b/ARCHITECTURE.md@@ -231,12 +231,15 @@ sequenceDiagramreadback. Drawing happens on the event-loop thread only; decoding on aworker.- **The launch screen** (`concat/ui/start.slint`) is a launcher: a rail of- verbs, and beside it either the new-project form or the whole recent list.- It takes three shapes by width — the rail with its words, the rail as- icons only, or the phone shape, where the rail becomes a bar of tabs above- the content and every label sits over its value. The form's frame is a- shape and a size rather than a fixed list; `frame_size` in `studio.rs`- is the one place that turns the pair into pixels.+ verbs, and beside it the projects this machine has opened, as a grid+ whose first card starts a new one. The new-project form is a sheet over+ the window, `NewProjectDialog`, held at the window root with the other+ sheets and opened by that card or the rail's first verb. The screen takes+ three shapes by width — the rail with its words, the rail as icons only,+ or the phone shape, where the rail's verbs sit beside the heading and the+ sheet's labels sit over their values. The form's frame is a shape and a+ size rather than a fixed list; `frame_size` in `studio.rs` is the one+ place that turns the pair into pixels.## 6. The document, undo and the filediff --git a/src/crates/concat/locales/de.json b/src/crates/concat/locales/de.jsonindex 3269c53e..2037499b 100644--- a/src/crates/concat/locales/de.json+++ b/src/crates/concat/locales/de.json@@ -653,6 +653,7 @@"PROJECT": "PROJEKT","Project": "Projekt","Project saved": "Projekt gespeichert",+ "Projects": "Projekte","Protect skin": "Protect skin","Punch": "Punch","Pure black and pure white, cut at one level of brightness.": "Pure black and pure white, cut at one level of brightness.",@@ -675,7 +676,6 @@"Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.": "Liest in der Stimme, die in einer Aufnahme aus den Medien zu hören ist. Die ersten zehn Sekunden ab der unten gewählten Stelle sind das, worauf das Modell hört.","Reads in the voice heard in the clip selected on the timeline": "Liest in der Stimme, die im auf der Zeitleiste ausgewählten Clip zu hören ist","Reattach audio": "Audio wieder anhängen",- "Recent": "Zuletzt","Recommended": "Empfohlen","Red and blue pulled apart, the colour fringing of a cheap lens.": "Red and blue pulled apart, the colour fringing of a cheap lens.","Redo": "Wiederholen",@@ -740,7 +740,6 @@"Script": "Skript","Scroll Ticker": "Laufband","Search {0}s": "{0} suchen",- "See all": "Alle anzeigen","Segments": "Segmente","Select a clip on the timeline first": "Wähle zuerst einen Clip auf der Zeitleiste","Select a clip to edit its keyframes": "Wähle einen Clip, um seine Keyframes zu bearbeiten",diff --git a/src/crates/concat/locales/en.json b/src/crates/concat/locales/en.jsonindex 82db00da..050587f3 100644--- a/src/crates/concat/locales/en.json+++ b/src/crates/concat/locales/en.json@@ -653,6 +653,7 @@"PROJECT": "PROJECT","Project": "Project","Project saved": "Project saved",+ "Projects": "Projects","Protect skin": "Protect skin","Punch": "Punch","Pure black and pure white, cut at one level of brightness.": "Pure black and pure white, cut at one level of brightness.",@@ -675,7 +676,6 @@"Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.": "Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.","Reads in the voice heard in the clip selected on the timeline": "Reads in the voice heard in the clip selected on the timeline","Reattach audio": "Reattach audio",- "Recent": "Recent","Recommended": "Recommended","Red and blue pulled apart, the colour fringing of a cheap lens.": "Red and blue pulled apart, the colour fringing of a cheap lens.","Redo": "Redo",@@ -740,7 +740,6 @@"Script": "Script","Scroll Ticker": "Scroll Ticker","Search {0}s": "Search {0}s",- "See all": "See all","Segments": "Segments","Select a clip on the timeline first": "Select a clip on the timeline first","Select a clip to edit its keyframes": "Select a clip to edit its keyframes",diff --git a/src/crates/concat/locales/es.json b/src/crates/concat/locales/es.jsonindex 2c9e7857..dfbb026d 100644--- a/src/crates/concat/locales/es.json+++ b/src/crates/concat/locales/es.json@@ -653,6 +653,7 @@"PROJECT": "PROYECTO","Project": "Proyecto","Project saved": "Proyecto guardado",+ "Projects": "Proyectos","Protect skin": "Protect skin","Punch": "Punch","Pure black and pure white, cut at one level of brightness.": "Pure black and pure white, cut at one level of brightness.",@@ -675,7 +676,6 @@"Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.": "Lee con la voz que se oye en una grabación de la biblioteca de medios. El modelo escucha los diez primeros segundos desde el punto elegido abajo.","Reads in the voice heard in the clip selected on the timeline": "Lee con la voz que se oye en el clip seleccionado en la línea de tiempo","Reattach audio": "Volver a unir el audio",- "Recent": "Recientes","Recommended": "Recomendada","Red and blue pulled apart, the colour fringing of a cheap lens.": "Red and blue pulled apart, the colour fringing of a cheap lens.","Redo": "Rehacer",@@ -740,7 +740,6 @@"Script": "Guion","Scroll Ticker": "Cinta de desplazamiento","Search {0}s": "Buscar {0}",- "See all": "Ver todo","Segments": "Segmentos","Select a clip on the timeline first": "Selecciona primero un clip en la línea de tiempo","Select a clip to edit its keyframes": "Selecciona un clip para editar sus fotogramas clave",diff --git a/src/crates/concat/locales/fa.json b/src/crates/concat/locales/fa.jsonindex 62cf8d5e..329394a0 100644--- a/src/crates/concat/locales/fa.json+++ b/src/crates/concat/locales/fa.json@@ -653,6 +653,7 @@"PROJECT": "پروژه","Project": "پروژه","Project saved": "پروژه ذخیره شد",+ "Projects": "پروژهها","Protect skin": "محافظت از پوست","Punch": "قدرت (Punch)","Pure black and pure white, cut at one level of brightness.": "سیاهی خالص و سفیدی خالص که در یک سطح از روشنایی از هم جدا میشوند.",@@ -675,7 +676,6 @@"Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.": "با صدایی که در یک ضبط از Bin شنیده میشود میخواند. مدل به ده ثانیه اول از نقطه انتخابشده در پایین گوش میدهد.","Reads in the voice heard in the clip selected on the timeline": "با صدایی که در کلیپ انتخابشده روی تایملاین شنیده میشود میخواند","Reattach audio": "اتصال دوباره صدا",- "Recent": "اخیر","Recommended": "پیشنهادی","Red and blue pulled apart, the colour fringing of a cheap lens.": "قرمز و آبی از هم جدا میشوند و رنگ Fringing شبیه لنز ارزان ایجاد میشود.","Redo": "انجام مجدد",@@ -740,7 +740,6 @@"Script": "اسکریپت","Scroll Ticker": "نوار متحرک","Search {0}s": "جستجوی {0}",- "See all": "مشاهده همه","Segments": "قطعهها","Select a clip on the timeline first": "ابتدا یک کلیپ را روی تایملاین انتخاب کنید","Select a clip to edit its keyframes": "برای ویرایش کیفریمها یک کلیپ انتخاب کنید",diff --git a/src/crates/concat/locales/fr.json b/src/crates/concat/locales/fr.jsonindex 9c3eb017..b970dc30 100644--- a/src/crates/concat/locales/fr.json+++ b/src/crates/concat/locales/fr.json@@ -653,6 +653,7 @@"PROJECT": "PROJET","Project": "Projet","Project saved": "Projet enregistré",+ "Projects": "Projets","Protect skin": "Protect skin","Punch": "Punch","Pure black and pure white, cut at one level of brightness.": "Pure black and pure white, cut at one level of brightness.",@@ -675,7 +676,6 @@"Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.": "Lit avec la voix entendue dans un enregistrement du chutier. Les dix premières secondes à partir du point choisi ci-dessous sont ce que le modèle écoute.","Reads in the voice heard in the clip selected on the timeline": "Lit avec la voix entendue dans le clip sélectionné sur la timeline","Reattach audio": "Rattacher l'audio",- "Recent": "Récents","Recommended": "Recommandée","Red and blue pulled apart, the colour fringing of a cheap lens.": "Red and blue pulled apart, the colour fringing of a cheap lens.","Redo": "Rétablir",@@ -740,7 +740,6 @@"Script": "Texte","Scroll Ticker": "Bandeau défilant","Search {0}s": "Rechercher un {0}",- "See all": "Tout voir","Segments": "Segments","Select a clip on the timeline first": "Sélectionnez d'abord un clip sur la timeline","Select a clip to edit its keyframes": "Sélectionnez un clip pour modifier ses images clés",diff --git a/src/crates/concat/locales/hr.json b/src/crates/concat/locales/hr.jsonindex b84df83e..309bf16e 100644--- a/src/crates/concat/locales/hr.json+++ b/src/crates/concat/locales/hr.json@@ -653,6 +653,7 @@"PROJECT": "PROJEKT","Project": "Projekt","Project saved": "Projekt spremljen",+ "Projects": "Projekti","Protect skin": "Zaštiti kožu","Punch": "Udarac","Pure black and pure white, cut at one level of brightness.": "Čista crna i čista bijela, rezane na jednoj razini svjetline.",@@ -675,7 +676,6 @@"Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.": "Čita glasom koji se čuje u snimci iz spremnika. Model sluša prvih deset sekundi od točke odabrane ispod.","Reads in the voice heard in the clip selected on the timeline": "Čita glasom koji se čuje u klipu odabranom na vremenskoj liniji","Reattach audio": "Ponovno spoji zvuk",- "Recent": "Nedavno","Recommended": "Preporučeno","Red and blue pulled apart, the colour fringing of a cheap lens.": "Crvena i plava razdvojene, kolorni rub jeftinog objektiva.","Redo": "Ponovi",@@ -740,7 +740,6 @@"Script": "Skripta","Scroll Ticker": "Pomični natpis","Search {0}s": "Pretraži {0}e",- "See all": "Prikaži sve","Segments": "Segmenti","Select a clip on the timeline first": "Prvo odaberite klip na vremenskoj liniji","Select a clip to edit its keyframes": "Odaberite klip za uređivanje njegovih ključnih kadrova",diff --git a/src/crates/concat/locales/it.json b/src/crates/concat/locales/it.jsonindex f6f02ac6..e0e30275 100644--- a/src/crates/concat/locales/it.json+++ b/src/crates/concat/locales/it.json@@ -653,6 +653,7 @@"PROJECT": "PROGETTO","Project": "Progetto","Project saved": "Progetto salvato",+ "Projects": "Progetti","Protect skin": "Protect skin","Punch": "Punch","Pure black and pure white, cut at one level of brightness.": "Pure black and pure white, cut at one level of brightness.",@@ -675,7 +676,6 @@"Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.": "Legge con la voce che si sente in una registrazione del pannello Media. Il modello ascolta i primi dieci secondi dal punto scelto qui sotto.","Reads in the voice heard in the clip selected on the timeline": "Legge con la voce che si sente nella clip selezionata sulla timeline","Reattach audio": "Ricollega l'audio",- "Recent": "Recenti","Recommended": "Consigliata","Red and blue pulled apart, the colour fringing of a cheap lens.": "Red and blue pulled apart, the colour fringing of a cheap lens.","Redo": "Ripeti",@@ -740,7 +740,6 @@"Script": "Testo","Scroll Ticker": "Testo scorrevole","Search {0}s": "Cerca {0}",- "See all": "Vedi tutto","Segments": "Segmenti","Select a clip on the timeline first": "Seleziona prima una clip sulla timeline","Select a clip to edit its keyframes": "Seleziona una clip per modificarne i fotogrammi chiave",diff --git a/src/crates/concat/locales/ja.json b/src/crates/concat/locales/ja.jsonindex 58d29448..280a02c8 100644--- a/src/crates/concat/locales/ja.json+++ b/src/crates/concat/locales/ja.json@@ -653,6 +653,7 @@"PROJECT": "プロジェクト","Project": "プロジェクト","Project saved": "プロジェクトを保存しました",+ "Projects": "プロジェクト","Protect skin": "Protect skin","Punch": "Punch","Pure black and pure white, cut at one level of brightness.": "Pure black and pure white, cut at one level of brightness.",@@ -675,7 +676,6 @@"Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.": "ビンの録音に聞こえる声で読み上げます。モデルが聞くのは、下で選んだ位置から最初の 10 秒です。","Reads in the voice heard in the clip selected on the timeline": "タイムラインで選択したクリップに聞こえる声で読み上げます","Reattach audio": "音声を再結合",- "Recent": "最近","Recommended": "推奨","Red and blue pulled apart, the colour fringing of a cheap lens.": "Red and blue pulled apart, the colour fringing of a cheap lens.","Redo": "やり直す",@@ -740,7 +740,6 @@"Script": "原稿","Scroll Ticker": "スクロールティッカー","Search {0}s": "{0}を検索",- "See all": "すべて表示","Segments": "分割数","Select a clip on the timeline first": "まずタイムラインでクリップを選択してください","Select a clip to edit its keyframes": "クリップを選択するとキーフレームを編集できます",diff --git a/src/crates/concat/locales/ko.json b/src/crates/concat/locales/ko.jsonindex c58a8aa3..bf2e5228 100644--- a/src/crates/concat/locales/ko.json+++ b/src/crates/concat/locales/ko.json@@ -653,6 +653,7 @@"PROJECT": "프로젝트","Project": "프로젝트","Project saved": "프로젝트를 저장했습니다",+ "Projects": "프로젝트","Protect skin": "Protect skin","Punch": "Punch","Pure black and pure white, cut at one level of brightness.": "Pure black and pure white, cut at one level of brightness.",@@ -675,7 +676,6 @@"Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.": "미디어 빈에 있는 녹음 속 목소리로 읽습니다. 아래에서 고른 지점부터 10초 동안을 모델이 듣습니다.","Reads in the voice heard in the clip selected on the timeline": "타임라인에서 선택한 클립 속 목소리로 읽습니다","Reattach audio": "오디오 다시 연결",- "Recent": "최근","Recommended": "권장","Red and blue pulled apart, the colour fringing of a cheap lens.": "Red and blue pulled apart, the colour fringing of a cheap lens.","Redo": "다시 실행",@@ -740,7 +740,6 @@"Script": "대본","Scroll Ticker": "스크롤 티커","Search {0}s": "{0} 검색",- "See all": "모두 보기","Segments": "조각 수","Select a clip on the timeline first": "먼저 타임라인에서 클립을 선택하세요","Select a clip to edit its keyframes": "키프레임을 편집할 클립을 선택하세요",diff --git a/src/crates/concat/locales/pt-BR.json b/src/crates/concat/locales/pt-BR.jsonindex fb0e12be..6fe2c33c 100644--- a/src/crates/concat/locales/pt-BR.json+++ b/src/crates/concat/locales/pt-BR.json@@ -653,6 +653,7 @@"PROJECT": "PROJETO","Project": "Projeto","Project saved": "Projeto salvo",+ "Projects": "Projetos","Protect skin": "Protect skin","Punch": "Punch","Pure black and pure white, cut at one level of brightness.": "Pure black and pure white, cut at one level of brightness.",@@ -675,7 +676,6 @@"Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.": "Lê na voz ouvida numa gravação da biblioteca. Os primeiros dez segundos a partir do ponto escolhido abaixo são o que o modelo escuta.","Reads in the voice heard in the clip selected on the timeline": "Lê na voz ouvida no clipe selecionado na linha do tempo","Reattach audio": "Reanexar áudio",- "Recent": "Recentes","Recommended": "Recomendada","Red and blue pulled apart, the colour fringing of a cheap lens.": "Red and blue pulled apart, the colour fringing of a cheap lens.","Redo": "Refazer",@@ -740,7 +740,6 @@"Script": "Roteiro","Scroll Ticker": "Letreiro rolante","Search {0}s": "Buscar {0}",- "See all": "Ver tudo","Segments": "Segmentos","Select a clip on the timeline first": "Selecione primeiro um clipe na linha do tempo","Select a clip to edit its keyframes": "Selecione um clipe para editar seus quadros-chave",diff --git a/src/crates/concat/locales/ru.json b/src/crates/concat/locales/ru.jsonindex 9f10719f..125686c4 100644--- a/src/crates/concat/locales/ru.json+++ b/src/crates/concat/locales/ru.json@@ -653,6 +653,7 @@"PROJECT": "ПРОЕКТ","Project": "Проект","Project saved": "Проект сохранён",+ "Projects": "Проекты","Protect skin": "Беречь кожу","Punch": "Удар","Pure black and pure white, cut at one level of brightness.": "Чистый чёрный и чистый белый, разрезанные по одному уровню яркости.",@@ -675,7 +676,6 @@"Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.": "Читает голосом, звучащим в записи из медиа. Модель слушает первые десять секунд от точки, выбранной ниже.","Reads in the voice heard in the clip selected on the timeline": "Читает голосом, звучащим в клипе, выбранном на таймлайне","Reattach audio": "Присоединить звук обратно",- "Recent": "Недавние","Recommended": "Рекомендуется","Red and blue pulled apart, the colour fringing of a cheap lens.": "Красный и синий разведены — цветная кайма дешёвого объектива.","Redo": "Повторить",@@ -740,7 +740,6 @@"Script": "Текст","Scroll Ticker": "Бегущая строка","Search {0}s": "Поиск: {0}",- "See all": "Показать все","Segments": "Сегменты","Select a clip on the timeline first": "Сначала выберите клип на таймлайне","Select a clip to edit its keyframes": "Выберите клип, чтобы редактировать его ключевые кадры",diff --git a/src/crates/concat/locales/tr.json b/src/crates/concat/locales/tr.jsonindex fa82e694..77a7169f 100644--- a/src/crates/concat/locales/tr.json+++ b/src/crates/concat/locales/tr.json@@ -653,6 +653,7 @@"PROJECT": "PROJE","Project": "Proje","Project saved": "Proje kaydedildi",+ "Projects": "Projeler","Protect skin": "Protect skin","Punch": "Punch","Pure black and pure white, cut at one level of brightness.": "Pure black and pure white, cut at one level of brightness.",@@ -675,7 +676,6 @@"Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.": "Medya kutusundaki bir kayıtta duyulan sesle okur. Model, aşağıda seçilen noktadan itibaren ilk on saniyeyi dinler.","Reads in the voice heard in the clip selected on the timeline": "Zaman çizelgesinde seçili klipte duyulan sesle okur","Reattach audio": "Sesi yeniden bağla",- "Recent": "Son kullanılanlar","Recommended": "Önerilen","Red and blue pulled apart, the colour fringing of a cheap lens.": "Red and blue pulled apart, the colour fringing of a cheap lens.","Redo": "Yinele",@@ -740,7 +740,6 @@"Script": "Metin","Scroll Ticker": "Kayan bant","Search {0}s": "{0} ara",- "See all": "Tümünü gör","Segments": "Bölümler","Select a clip on the timeline first": "Önce zaman çizelgesinde bir klip seçin","Select a clip to edit its keyframes": "Anahtar karelerini düzenlemek için bir klip seçin",diff --git a/src/crates/concat/locales/zh-Hans.json b/src/crates/concat/locales/zh-Hans.jsonindex 4c6f3ebe..ff780871 100644--- a/src/crates/concat/locales/zh-Hans.json+++ b/src/crates/concat/locales/zh-Hans.json@@ -653,6 +653,7 @@"PROJECT": "项目","Project": "项目","Project saved": "项目已保存",+ "Projects": "项目","Protect skin": "保护肤色","Punch": "冲击","Pure black and pure white, cut at one level of brightness.": "纯黑与纯白,在同一亮度处一刀切开。",@@ -675,7 +676,6 @@"Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.": "用媒体库中某段录音里的声音朗读。模型会聆听从下方所选位置开始的前十秒。","Reads in the voice heard in the clip selected on the timeline": "用时间线上所选片段中的声音朗读","Reattach audio": "重新附加音频",- "Recent": "最近","Recommended": "推荐","Red and blue pulled apart, the colour fringing of a cheap lens.": "红蓝两色错开,廉价镜头的彩色镶边。","Redo": "重做",@@ -740,7 +740,6 @@"Script": "文稿","Scroll Ticker": "滚动字幕条","Search {0}s": "搜索{0}",- "See all": "查看全部","Segments": "分段","Select a clip on the timeline first": "请先在时间线上选择一个片段","Select a clip to edit its keyframes": "选择一个片段以编辑其关键帧",diff --git a/src/crates/concat/locales/zh-TW.json b/src/crates/concat/locales/zh-TW.jsonindex 7456ee39..f36b2c45 100644--- a/src/crates/concat/locales/zh-TW.json+++ b/src/crates/concat/locales/zh-TW.json@@ -653,6 +653,7 @@"PROJECT": "專案","Project": "專案","Project saved": "專案已儲存",+ "Projects": "專案","Protect skin": "保護膚色","Punch": "衝擊","Pure black and pure white, cut at one level of brightness.": "純黑與純白,在同一亮度處一刀切開。",@@ -675,7 +676,6 @@"Reads in the voice heard in a recording from the bin. The first ten seconds from the point chosen below are what the model listens to.": "用媒體庫中某段錄音裡的聲音朗讀。模型會聆聽從下方所選位置開始的前十秒。","Reads in the voice heard in the clip selected on the timeline": "用時間軸上所選片段中的聲音朗讀","Reattach audio": "重新附加音訊",- "Recent": "最近","Recommended": "推薦","Red and blue pulled apart, the colour fringing of a cheap lens.": "紅藍兩色錯開,廉價鏡頭的彩色鑲邊。","Redo": "重做",@@ -740,7 +740,6 @@"Script": "文稿","Scroll Ticker": "滾動跑馬燈","Search {0}s": "搜尋{0}",- "See all": "檢視全部","Segments": "分段","Select a clip on the timeline first": "請先在時間軸上選取一個片段","Select a clip to edit its keyframes": "選取一個片段以編輯其關鍵影格",diff --git a/src/crates/concat/src/lib.rs b/src/crates/concat/src/lib.rsindex 721cca1d..0d1b96fa 100644--- a/src/crates/concat/src/lib.rs+++ b/src/crates/concat/src/lib.rs@@ -411,6 +411,12 @@ pub fn run() -> Result<(), slint::PlatformError> {let editor = app.global::<Editor>();// ── the launch screen ──+ app.on_start_compose(on_window!(|state| {+ state.handle(Msg::Start(StartMsg::Compose));+ }));+ app.on_start_dismiss(on_window!(|state| {+ state.handle(Msg::Start(StartMsg::Dismiss));+ }));app.on_start_name_edited(on_window!(|state, name: SharedString| {state.handle(Msg::Start(StartMsg::NameEdited(name.to_string())));}));diff --git a/src/crates/concat/src/panes/start.rs b/src/crates/concat/src/panes/start.rsindex 6df8f1d4..b710ce9c 100644--- a/src/crates/concat/src/panes/start.rs+++ b/src/crates/concat/src/panes/start.rs@@ -1,9 +1,9 @@// SPDX-License-Identifier: AGPL-3.0-or-later// SPDX-FileCopyrightText: 2026 Jareer and Concat contributors-//! The launch screen's form: a new project's name, place, shape, size and-//! rate, the verb that opens one that already exists, and the recent-//! list's own two verbs.+//! The launch screen's sheet: a new project's name, place, shape, size+//! and rate, the verb that opens one that already exists, and the project+//! grid's own two verbs.use concat_host::projects;@@ -12,9 +12,13 @@ use crate::platform;use crate::studio::{ASPECTS, SIZES, START_RATES, Studio, frame_size, home_folder};use crate::ui::StartData;-/// Everything that can happen to the launch screen's form.+/// Everything that can happen to the launch screen's sheet.#[derive(Clone, Debug)]pub enum StartMsg {+ /// Put up the sheet a new project is described on.+ Compose,+ /// Take it down, keeping what was typed for next time.+ Dismiss,NameEdited(String),LocationEdited(String),/// The frame's shape: 16:9, 9:16, 1:1, 4:3.@@ -32,8 +36,12 @@ pub enum StartMsg {ForgetRecent(String),}-/// The form on the launch screen.+/// The sheet on the launch screen.pub struct StartPane {+ /// The sheet is up. Down again once the project it describes opens,+ /// and not before: a create that fails keeps the form, and its notice,+ /// on screen.+ pub composing: bool,pub name: String,pub location: String,/// Index into [`ASPECTS`].@@ -48,6 +56,7 @@ pub struct StartPane {impl Default for StartPane {fn default() -> Self {Self {+ composing: false,name: "Untitled project".into(),// A phone has no desk: its projects live at the top of the// folder the file manager shows for the app.@@ -72,6 +81,13 @@ impl StartPane {/// this runs the studio's copy of the pane is a blank it must not read.pub fn update(&mut self, msg: StartMsg, studio: &mut Studio) {match msg {+ StartMsg::Compose => self.composing = true,+ StartMsg::Dismiss => {+ self.composing = false;+ // The notice belongs to the attempt it reported on, not to+ // the next time the sheet comes up.+ self.error.clear();+ }StartMsg::NameEdited(name) => self.name = name,StartMsg::LocationEdited(path) => self.location = path,StartMsg::AspectChanged(index) => {@@ -93,20 +109,27 @@ impl StartPane {}StartMsg::Create => self.create(studio),StartMsg::Open => self.open(studio),+ // Both of the grid's verbs report through the toast, as Open+ // does: the sheet is down while a card is pressed, and a notice+ // inside it would go unseen.StartMsg::OpenRecent(path) => {- let opened = projects::open(&path).and_then(|info| studio.open_project(info));- self.opened(opened);+ if let Err(error) = projects::open(&path).and_then(|info| studio.open_project(info))+ {+ studio.notify(&error, true);+ }}StartMsg::ForgetRecent(path) => {if let Err(error) = projects::forget(&studio.host.dirs.config, &path) {- self.error = error;+ studio.notify(&error, true);}studio.recents = projects::list(&studio.host.dirs.config);}}}- /// Makes the project the form describes and opens it.+ /// Makes the project the sheet describes and opens it. The sheet comes+ /// down with the project open behind it; a failure leaves it up, with+ /// the reason in its notice.fn create(&mut self, studio: &mut Studio) {let name = self.name.trim().to_owned();let name = if name.is_empty() {@@ -122,7 +145,14 @@ impl StartPane {}let opened = projects::create(&self.location, &name, width, height, num, den).and_then(|info| studio.open_project(info));- self.opened(opened);+ self.busy = false;+ match opened {+ Ok(()) => {+ self.composing = false;+ self.error.clear();+ }+ Err(error) => self.error = error,+ }}/// Opens a project folder that already exists.@@ -134,9 +164,9 @@ impl StartPane {////// This is also what File › Open project does, from the menu bar of a/// window that already has a project in it. That is why it reports- /// through the toast rather than through the form's own notice: the- /// notice is on the launch screen, and half the presses of this never- /// see the launch screen at all.+ /// through the toast rather than through the sheet's notice: the sheet+ /// is down when this is pressed, and half the presses of this never see+ /// the launch screen at all.fn open(&mut self, studio: &mut Studio) {let Some(folder) = platform::pick_folder(&t("Open a project"), &self.location) else {return;@@ -151,20 +181,12 @@ impl StartPane {}}- /// The form after an open: at rest, and saying why when it failed.- fn opened(&mut self, result: Result<(), String>) {- self.busy = false;- match result {- Ok(()) => self.error.clear(),- Err(error) => self.error = error,- }- }-- /// The form as Slint shows it.+ /// The sheet as Slint shows it.pub fn data(&self) -> StartData {let (width, height) = frame_size(self.aspect, self.size);let (_, num, den) = START_RATES[self.rate.min(START_RATES.len() - 1)];StartData {+ composing: self.composing,name: self.name.as_str().into(),location: self.location.as_str().into(),aspect: self.aspect as i32,diff --git a/src/crates/concat/ui/app.slint b/src/crates/concat/ui/app.slintindex ad5f4fd8..27c30f7e 100644--- a/src/crates/concat/ui/app.slint+++ b/src/crates/concat/ui/app.slint@@ -30,7 +30,7 @@ import { SpeechDialog, SpeechSheetData } from "dialogs/speech.slint";import { DockDivider, DockSide, SeatBox } from "dock.slint";import { Editor } from "editor.slint";import { PaneKind, Panes } from "workspace/pane-switcher.slint";-import { ChipOption, RecentProjectData, StartData, StartScreen } from "start.slint";+import { ChipOption, NewProjectDialog, RecentProjectData, StartData, StartScreen } from "start.slint";import { TitleBar } from "title-bar.slint";import {AppliedEntryData, AppliedParamData, CatalogueEntryData, Library, LibraryViewData,@@ -102,7 +102,8 @@ export component App inherits Window {}}property <bool> sheet-open: root.export.open || root.settings.open- || root.project-sheet.open || root.captions.open || root.speech.open;+ || root.project-sheet.open || root.captions.open || root.speech.open+ || root.start.composing;changed sheet-open => {if (!root.sheet-open) {keys.focus();@@ -126,6 +127,9 @@ export component App inherits Window {in property <[ChipOption]> start-rates;in property <[RecentProjectData]> recents;+ /// Put up the new-project sheet, and take it down again.+ callback start-compose();+ callback start-dismiss();callback start-name-edited(name: string);callback start-location-edited(path: string);callback start-browse();@@ -483,24 +487,14 @@ export component App inherits Window {if root.on-start: StartScreen {vertical-stretch: 1;- data: root.start;- aspects: root.start-aspects;- sizes: root.start-sizes;- rates: root.start-rates;recents: root.recents;+ busy: root.start.busy;- name-edited(name) => { root.start-name-edited(name); }- location-edited(path) => { root.start-location-edited(path); }- browse => { root.start-browse(); }- aspect-changed(index) => { root.start-aspect-changed(index); }- size-changed(index) => { root.start-size-changed(index); }- rate-changed(index) => { root.start-rate-changed(index); }- create => { root.start-create(); }+ compose => { root.start-compose(); }open => { root.start-open(); }open-settings => { root.open-settings(); }open-recent(path) => { root.start-open-recent(path); }forget-recent(path) => { root.start-forget-recent(path); }- dismiss-error => { root.start-dismiss-error(); }}// Everything the workspace shows now reads the Editor global, so@@ -516,6 +510,32 @@ export component App inherits Window {// Declared last, and that is load-bearing: Slint paints siblings in// declaration order, so a modal placed above the workspace in the file is// painted *under* it on screen — open, correct, and completely hidden.+ //+ // The launch screen's sheet first among them. Settings is the only other+ // sheet the launch screen can put up, and never at the same time — the+ // scrim keeps the rail from being pressed — so the order between the two+ // decides nothing and this one reads first because it comes first.+ NewProjectDialog {+ x: 0;+ y: 0;+ width: root.width;+ height: root.height;+ data: root.start;+ aspects: root.start-aspects;+ sizes: root.start-sizes;+ rates: root.start-rates;++ closed => { root.start-dismiss(); }+ name-edited(name) => { root.start-name-edited(name); }+ location-edited(path) => { root.start-location-edited(path); }+ browse => { root.start-browse(); }+ aspect-changed(index) => { root.start-aspect-changed(index); }+ size-changed(index) => { root.start-size-changed(index); }+ rate-changed(index) => { root.start-rate-changed(index); }+ create => { root.start-create(); }+ dismiss-error => { root.start-dismiss-error(); }+ }+ExportDialog {x: 0;y: 0;diff --git a/src/crates/concat/ui/start.slint b/src/crates/concat/ui/start.slintindex 5bcec5a8..14f8773e 100644--- a/src/crates/concat/ui/start.slint+++ b/src/crates/concat/ui/start.slint@@ -3,7 +3,7 @@import { I18n } from "i18n.slint";import { Theme } from "theme/theme.slint";-import { CopyChip } from "primitives/modal.slint";+import { CopyChip, Modal } from "primitives/modal.slint";import { FocusRing } from "primitives/focus-ring.slint";import { Glyph, Icon } from "icons.slint";import { ThinScrollbar } from "primitives/scrollbar.slint";@@ -13,38 +13,43 @@ import { Tip } from "primitives/tooltip.slint";// under all of it — no card around the whole thing, no shadow. A setup// screen is not a dialog floating over something; it *is* the window.//-// The rail is what makes it a launcher rather than a form. Everything you+// The rail is what makes it a launcher rather than a list. Everything you// can do before a project is open is one column of verbs: start a new one,-// go through the ones you have, open a folder from disk, change the-// settings. The page beside it is whichever of the first two is current.-// Nothing here is a mode you have to leave — the rail is always there, and-// the two pages are two views of the same four hundred pixels.+// open a folder from disk, change the settings. The page beside it is the+// projects: every one this machine has opened, as a grid of posters, with+// one more card at the head of it that starts a new one. That card is the+// first thing on the page and the size of everything after it, so an empty+// machine sees one card and a full one sees the same card in front of the+// rest.//-// An editor should not drop you straight into an untitled timeline either:-// the frame rate, the frame shape and where the folder goes are decisions-// the whole edit depends on, and choosing them after material is cut is how-// you end up conforming footage.+// The new project's form is a sheet over the window — `NewProjectDialog`,+// held at the window root like every other sheet, since Slint has no+// portal — rather than a page of its own. An editor should not drop you+// straight into an untitled timeline: the frame rate, the frame shape and+// where the folder goes are decisions the whole edit depends on, and+// choosing them after material is cut is how you end up conforming+// footage. But five rows of settings are a question to answer, not a place+// to be, and a question is a sheet.//// Three shapes by the width the window is given, since a Slint layout has// no wrap://// - wide: the rail with its words, the page beside it;// - middle: the rail as icons only, each with its word in a tip;-// - narrow, a phone held upright: no rail at all — its two pages become two-// tabs above the content and its two actions become two round buttons-// beside them — every label above its value, every chip row across the-// width, and the forget cross on every recent card, since there is no-// hover to reveal it with.+// - narrow, a phone held upright: no rail at all — its two actions become+// two round buttons on the heading's row, the sheet's labels sit over+// their values with its chip rows across the width, and the forget cross+// stays on every card, since there is no hover to reveal it with.//// The look is the website's, which is the same product wearing the same// clothes: near-black steps for the surfaces, a hairline of light on the// top edge of anything raised, one lime accent used on almost nothing, and// a filled button whose fill is the ink rather than the accent. What the// site does with an accent — one highlighted word — this does with the-// rail's current marker and the one link in the form.+// plus on the new-project card and the one link in the sheet.//// There is no template store in this tree, which is also why the library's-// "save as template" is an unwired seam, and why the rail has no fifth+// "save as template" is an unwired seam, and why the rail has no fourth// verb./// One option on one of the form's three ladders.@@ -58,7 +63,7 @@ export struct ChipOption {ratio: float,}-/// One card in the Recent grid.+/// One card in the projects grid.////// The two lines under the name arrive formatted. A decimal frame rate to/// two places and a coarse "4 days ago" are both easier to produce where@@ -79,10 +84,14 @@ export struct RecentProjectData {poster: image,}-/// The form, as one struct — the same shape the two dialogs use, and for-/// the same reason: it is one screen's worth of state and a partial update+/// The form, as one struct — the same shape the other sheets use, and for+/// the same reason: it is one sheet's worth of state and a partial update/// is how a panel ends up showing half of two things.export struct StartData {+ /// The sheet is up. Rust takes it down when the project it describes+ /// opens, so a create that fails leaves the form and its notice where+ /// they were.+ composing: bool,name: string,location: string,/// Index into `aspects`; the ratio behind it is Rust's.@@ -145,14 +154,19 @@ component PlainInput inherits Rectangle {in property <length> size: Theme.fs-input;in property <string> face: Theme.font;in property <bool> enabled: true;- /// Takes the caret when the screen opens, and selects what is there —- /// so the default name can be replaced by typing rather than by- /// clearing it first.- in property <bool> autofocus;callback edited(text: string);callback accepted();+ /// Takes the caret, and selects what is there — so the default name+ /// can be replaced by typing rather than by clearing it first. Called+ /// by the sheet each time it opens: a field built once and shown many+ /// times cannot do this from `init`.+ public function take-focus() {+ input.focus();+ input.select-all();+ }+height: Math.max(22px, root.size + 8px);// The text being edited, held apart from `text`.@@ -164,13 +178,7 @@ component PlainInput inherits Rectangle {// the caret. Same as `Field` in primitives/modal.slint, same reason.property <string> draft;function seed() { root.draft = root.text; }- init => {- root.seed();- if (root.autofocus) {- input.focus();- input.select-all();- }- }+ init => { root.seed(); }changed text => {if (!input.has-focus) {root.seed();@@ -216,10 +224,9 @@ component PlainInput inherits Rectangle {}}-// The one accent-coloured word on the screen that is not the rail's marker.-// A link and not a button: it opens a picker for the field beside it rather-// than doing anything to the project, and a filled button here would-// out-shout Create.+// The one accent-coloured word in the sheet. A link and not a button: it+// opens a picker for the field beside it rather than doing anything to the+// project, and a filled button here would out-shout Create.component LinkButton inherits Rectangle {in property <string> label;in property <bool> enabled: true;@@ -250,8 +257,9 @@ component LinkButton inherits Rectangle {// One chip on a ladder: a pill that is either the answer or one of the// others. Selected is a lit surface and a brighter edge, never a fill of-// the accent — the accent on this screen belongs to the rail and the link,-// and four lime pills in a row would leave nothing for the button to say.+// the accent — the accent on this screen belongs to the new-project card+// and the link, and four lime pills in a row would leave nothing for the+// button to say.component Chip inherits Rectangle {in property <string> label;/// Non-zero draws the shape of that ratio before the word.@@ -447,32 +455,11 @@ component FormRow inherits Rectangle {}}-// The one raised surface on the screen. A panel over the page, a hairline-// of light caught on its top edge, and the largest corner in the app —-// what the site's cards do with `hairline` and `shadow-raised`, minus the-// drop shadow Slint has no way to draw.-component Card inherits Rectangle {- background: Theme.launch-panel;- border-radius: Theme.r-xl;- border-width: 1px;- border-color: Theme.line;-- Rectangle {- x: 1px;- y: 1px;- width: parent.width - 2px;- height: 1px;- background: Theme.line-strong;- }-- @children-}--// The pill the whole screen is built around, and its quieter sibling.+// The pill the sheet is built around, and its quieter sibling.//// Primary is the ink itself — near-white on the dark palette, near-black on// the light one — and not the accent. It is the site's rule: one accent,-// spent on a word and a marker, never on a fill this size. Hover goes one+// spent on a mark and a word, never on a fill this size. Hover goes one// step further from the ground rather than towards it, which is what// `fg-hot` is for.component PillButton inherits Rectangle {@@ -577,42 +564,28 @@ component BarAction inherits Rectangle {// ── the rail ─────────────────────────────────────────────────────────────-// One verb in the rail: a page to go to, or a thing to do. The current one-// wears a lit surface and a two-pixel accent mark on its leading edge —-// the whole of the accent's job on this screen, alongside the one link.+// One verb in the rail: a thing to do. Lit under the pointer and nothing+// more — there is one page beside the rail, so no verb is ever the one you+// are on.component RailItem inherits Rectangle {in property <string> label;in property <Glyph> glyph;- in property <bool> current;in property <bool> enabled: true;/// Icons only, with the word in a tip: the middle width.in property <bool> compact;- /// A count after the word. Zero says nothing.- in property <int> badge;callback clicked();property <bool> lit: touch.has-hover && root.enabled;- property <brush> ink: root.current || root.lit ? Theme.fg : Theme.fg-muted;+ property <brush> ink: root.lit ? Theme.fg : Theme.fg-muted;height: 36px;border-radius: Theme.r;- background: root.current ? Theme.launch-field- : root.lit ? Theme.launch-raised- : Colors.transparent;+ background: root.lit ? Theme.launch-raised : Colors.transparent;opacity: root.enabled ? 1.0 : 0.4;animate background { duration: 120ms; easing: cubic-bezier(0.4, 0, 0.2, 1); }- if root.current: Rectangle {- x: 0;- y: (parent.height - self.height) / 2;- width: 2px;- height: 18px;- border-radius: 1px;- background: Theme.accent;- }-HorizontalLayout {padding-left: root.compact ? 0px : 13px;padding-right: root.compact ? 0px : 11px;@@ -639,16 +612,6 @@ component RailItem inherits Rectangle {overflow: elide;}}-- if !root.compact && root.badge > 0: VerticalLayout {- alignment: center;- Text {- text: root.badge;- color: Theme.fg-dim;- font-family: Theme.font-technical;- font-size: Theme.fs-sm;- }- }}touch := TouchArea {@@ -672,12 +635,10 @@ component Rail inherits Rectangle {/// make the screen's own minimum depend on whether the rail is up,/// which depends on the screen's width: a binding loop, and Slint says/// so.- in property <int> view;- in property <int> recents-count;in property <bool> compact;in property <bool> enabled: true;- callback go(view: int);+ callback compose();callback open();callback settings();@@ -697,26 +658,15 @@ component Rail inherits Rectangle {padding-bottom: 14px;spacing: 4px;+ // The same verb as the card at the head of the grid, for whoever+ // reads the rail first: a launcher's first row is where "new" is+ // expected to be, whatever the page beside it is showing.RailItem {label: I18n.t("New project");glyph: Glyph.plus;- current: root.view == 0;compact: root.compact;enabled: root.enabled;- clicked => { root.go(0); }- }-- // No stop for a list that is empty: a "Recent" heading over nothing- // is worse than no heading, and a rail item that leads to one is- // worse again.- if root.recents-count > 0: RailItem {- label: I18n.t("Recent");- glyph: Glyph.clock;- badge: root.recents-count;- current: root.view == 1;- compact: root.compact;- enabled: root.enabled;- clicked => { root.go(1); }+ clicked => { root.compose(); }}Rectangle { vertical-stretch: 1; }@@ -739,7 +689,56 @@ component Rail inherits Rectangle {}}-// ── the recents ──────────────────────────────────────────────────────────+// ── the projects ─────────────────────────────────────────────────────────++// The card that starts a new project: the first cell of the grid, the size+// of every other card in it, and the one thing on the page that is not a+// project yet. A plus in the accent with the verb under it, on the same+// surface the posters sit on — so it reads as one of them with nothing in+// it yet, rather than as a button that wandered into a list.+component NewProjectCard inherits Rectangle {+ in property <bool> enabled: true;++ callback clicked();++ property <bool> lit: touch.has-hover && root.enabled;++ border-radius: Theme.r-lg;+ background: root.lit ? Theme.launch-raised : Theme.launch-panel;+ border-width: 1px;+ border-color: root.lit ? Theme.line-strong : Theme.line;+ opacity: root.enabled ? 1.0 : 0.4;++ animate background, border-color { duration: 120ms; easing: cubic-bezier(0.4, 0, 0.2, 1); }++ VerticalLayout {+ alignment: center;+ spacing: 12px;++ HorizontalLayout {+ alignment: center;+ Icon {+ glyph: Glyph.plus;+ size: 28px;+ tint: Theme.accent;+ }+ }++ Text {+ text: I18n.t("New project");+ color: Theme.fg;+ font-size: Theme.fs-xl;+ font-weight: Theme.weight-title;+ horizontal-alignment: center;+ }+ }++ touch := TouchArea {+ enabled: root.enabled;+ mouse-cursor: pointer;+ clicked => { root.clicked(); }+ }+}// One project: its poster, its name, what it is, when it was last open —// and the cross that forgets it, on hover where there is a pointer and@@ -859,18 +858,20 @@ component PosterCard inherits Rectangle {}}+// The new-project card, then every project this machine has opened.+//// `grid-cols-[repeat(auto-fill,minmax(210px,1fr))]`, arithmetic instead of// a layout: Slint has no auto-fill grid, and a GridLayout wants its cells// named at compile time, which a model cannot do. Same as the bin's grid in-// workspace/media-pane.slint.-component RecentsGrid inherits Rectangle {+// workspace/media-pane.slint. The first cell is placed by hand and the+// model's cards count from one, which is the whole of how the new-project+// card comes first.+component ProjectsGrid inherits Rectangle {in property <[RecentProjectData]> recents;in property <bool> enabled: true;in property <bool> touchy;- /// One row of them and no more: the strip on the form's own page, which- /// is a glance at the list rather than the list.- in property <bool> one-row;+ callback compose();callback opened(path: string);callback forgotten(path: string);@@ -879,73 +880,54 @@ component RecentsGrid inherits Rectangle {property <int> cols: Math.max(1,Math.floor((root.width + root.gap) / (root.min-card + root.gap)));property <length> card-w: (root.width - (root.cols - 1) * root.gap) / root.cols;- /// poster + the name, the detail and the when under it+ /// poster + the name, the detail and the when under it — and the+ /// new-project card is the same box, so the grid has one row height.property <length> card-h: root.card-w * 9 / 16 + 74px;- /// How many are drawn. The rest of the model is still repeated over —- /// a Slint repeater has no take(n) — but each one past this is a box of- /// no size with nothing in it.- out property <int> shown: root.one-row- ? Math.min(root.cols, root.recents.length)- : root.recents.length;- property <int> rows: Math.ceil(root.shown / root.cols);-- height: root.rows > 0 ? root.rows * (root.card-h + root.gap) - root.gap : 0px;-- for project[index] in root.recents: Rectangle {- x: Math.mod(index, root.cols) * (root.card-w + root.gap);- y: Math.floor(index / root.cols) * (root.card-h + root.gap);- width: index < root.shown ? root.card-w : 0px;- height: index < root.shown ? root.card-h : 0px;-- if index < root.shown: PosterCard {- width: parent.width;- height: parent.height;- project: project;- enabled: root.enabled;- touchy: root.touchy;- opened => { root.opened(project.path); }- forgotten => { root.forgotten(project.path); }- }+ /// The new-project card and every project after it.+ property <int> count: root.recents.length + 1;+ property <int> rows: Math.ceil(root.count / root.cols);++ height: root.rows * (root.card-h + root.gap) - root.gap;++ NewProjectCard {+ x: 0;+ y: 0;+ width: root.card-w;+ height: root.card-h;+ enabled: root.enabled;+ clicked => { root.compose(); }+ }++ for project[index] in root.recents: PosterCard {+ x: Math.mod(index + 1, root.cols) * (root.card-w + root.gap);+ y: Math.floor((index + 1) / root.cols) * (root.card-h + root.gap);+ width: root.card-w;+ height: root.card-h;+ project: project;+ enabled: root.enabled;+ touchy: root.touchy;+ opened => { root.opened(project.path); }+ forgotten => { root.forgotten(project.path); }}}// ── the screen ───────────────────────────────────────────────────────────export component StartScreen inherits Rectangle {- in property <StartData> data;- /// The three ladders. The numbers behind each index are Rust's, so- /// there is one place that knows what 4K is in pixels and that 29.97 is- /// 30000 over 1001 — see `ASPECTS`, `SIZES` and `START_RATES` in the- /// window.- in property <[ChipOption]> aspects;- in property <[ChipOption]> sizes;- in property <[ChipOption]> rates;in property <[RecentProjectData]> recents;+ /// A project is being made: every verb on the page waits for it.+ in property <bool> busy;- callback name-edited(name: string);- callback location-edited(path: string);- callback browse();- callback aspect-changed(index: int);- callback size-changed(index: int);- callback rate-changed(index: int);- callback create();+ /// Put up the sheet a new project is described on.+ callback compose();/// Open a project that already exists, picked from disk.callback open();callback open-recent(path: string);callback forget-recent(path: string);- callback dismiss-error();callback open-settings();- /// Which of the rail's two pages is current: the form, or the whole- /// recent list.- property <int> view: 0;- /// And which one is actually shown. Forgetting the last project takes- /// the second page's reason to exist away with it, so the screen falls- /// back to the form rather than leaving the rail pointing at nothing.- property <int> page: root.recents.length > 0 ? root.view : 0;-/// A phone held upright, or a window squeezed that far: under this the- /// rail is a bar and every label sits over its value.+ /// rail is gone and its verbs sit on the heading's row.property <bool> narrow: root.width < 680px;/// Under this the rail keeps its verbs but loses its words.property <bool> compact-rail: root.width < 940px;@@ -956,17 +938,12 @@ export component StartScreen inherits Rectangle {/// has less of it to give, and a phone less again.property <length> pad-top: root.narrow ? 24px: Math.max(32px, Math.min(88px, root.height / 9));- /// The content column. The list gets a wider one than the form: three- /// cards of history read as a shelf, three hundred pixels of input does- /// not read as anything.- property <length> content-w: root.page == 1 ? 1120px : 740px;+ /// The content column: wide enough that the cards read as a shelf.+ property <length> content-w: 1120px;/// The rail's width, and the page's left edge. Zero is a phone, which- /// has the rail's verbs in a bar of its own instead.+ /// has the rail's verbs on the heading's row instead.property <length> rail-w: root.narrow ? 0px : (root.compact-rail ? 62px : 208px);- /// A project needs somewhere to go. Everything else has a default.- property <bool> can-create: !root.data.busy && root.data.location != "";-background: Theme.launch-page;clip: true;@@ -981,11 +958,9 @@ export component StartScreen inherits Rectangle {width: root.rail-w;height: root.height;- view: root.page;- recents-count: root.recents.length;compact: root.compact-rail;- enabled: !root.data.busy;- go(view) => { root.view = view; }+ enabled: !root.busy;+ compose => { root.compose(); }open => { root.open(); }settings => { root.open-settings(); }}@@ -1014,74 +989,59 @@ export component StartScreen inherits Rectangle {stack := VerticalLayout {alignment: start;- // ── the rail's job, on a phone ───────────────────────- if root.narrow: HorizontalLayout {+ // ── the heading ──────────────────────────────────────+ HorizontalLayout {spacing: 8px;- Chip {- label: I18n.t("New project");- selected: root.page == 0;- enabled: !root.data.busy;- clicked => { root.view = 0; }+ Text {+ horizontal-stretch: 1;+ text: I18n.t("Projects");+ color: Theme.fg;+ // The one display-sized line in the app. The+ // tree bundles two faces and no display face,+ // so the interface face carries it at its+ // heaviest weight and tight tracking — -0.03em,+ // which at 34px is a point. A phone gets it at+ // 26px, still the largest thing on its screen+ // and no longer half of it.+ font-size: root.narrow ? 26px : Theme.fs-display;+ font-weight: Theme.weight-display;+ letter-spacing: root.narrow ? -0.6px : -1px;+ vertical-alignment: center;+ wrap: word-wrap;}- if root.recents.length > 0: Chip {- label: I18n.t("Recent");- selected: root.page == 1;- enabled: !root.data.busy;- clicked => { root.view = 1; }- }-- Rectangle { horizontal-stretch: 1; }-- VerticalLayout {+ // The rail's job, on a phone: its two verbs beside+ // the heading, since there is no column to put+ // them in. The third verb is already on the page,+ // as the first card.+ if root.narrow: VerticalLayout {alignment: center;horizontal-stretch: 0;BarAction {glyph: Glyph.folder;label: I18n.t("Open project");- enabled: !root.data.busy;+ enabled: !root.busy;clicked => { root.open(); }}}- VerticalLayout {+ if root.narrow: VerticalLayout {alignment: center;horizontal-stretch: 0;BarAction {glyph: Glyph.settings;label: I18n.t("Settings");- enabled: !root.data.busy;+ enabled: !root.busy;clicked => { root.open-settings(); }}}}- if root.narrow: Rectangle { height: 28px; }-- // ── the heading ──────────────────────────────────────- Text {- text: root.page == 1 ? I18n.t("Recent") : I18n.t("New project");- color: Theme.fg;- // The one display-sized line in the app. The- // tree bundles two faces and no display face,- // so the interface face carries it at its- // heaviest weight and tight tracking — -0.03em,- // which at 34px is a point. A phone gets it at- // 26px, still the largest thing on its screen- // and no longer half of it.- font-size: root.narrow ? 26px : Theme.fs-display;- font-weight: Theme.weight-display;- letter-spacing: root.narrow ? -0.6px : -1px;- wrap: word-wrap;- }-Rectangle { height: 8px; }Text {- text: root.page == 1- ? I18n.t("Everything you have opened on this machine.")- : I18n.t("These settings apply to the whole edit and cannot be changed later.");+ text: I18n.t("Everything you have opened on this machine.");color: Theme.fg-muted;font-size: root.narrow ? Theme.fs-lg : Theme.fs-xl;wrap: word-wrap;@@ -1089,349 +1049,357 @@ export component StartScreen inherits Rectangle {Rectangle { height: root.narrow ? 24px : 34px; }- // ── the form ─────────────────────────────────────────- if root.page == 0: Card {- VerticalLayout {- padding-left: root.narrow ? 18px : 26px;- padding-right: root.narrow ? 18px : 26px;- padding-top: 6px;- padding-bottom: 22px;-- FormRow {- label: I18n.upper("Name");- stacked: root.narrow;-- PlainInput {- text: root.data.name;- placeholder: I18n.t("Untitled project");- autofocus: true;- enabled: !root.data.busy;- edited(text) => { root.name-edited(text); }- accepted => { root.create(); }- }- }+ // ── the grid ─────────────────────────────────────────+ ProjectsGrid {+ recents: root.recents;+ enabled: !root.busy;+ touchy: root.narrow;+ compose => { root.compose(); }+ opened(path) => { root.open-recent(path); }+ forgotten(path) => { root.forget-recent(path); }+ }+ }+ }+ }- FormRow {- label: I18n.upper("Location");- stacked: root.narrow;-- HorizontalLayout {- spacing: 12px;-- PlainInput {- horizontal-stretch: 1;- text: root.data.location;- placeholder: I18n.t("Choose a folder");- size: Theme.fs;- face: Theme.font-technical;- enabled: !root.data.busy;- edited(text) => { root.location-edited(text); }- accepted => { root.create(); }- }-- VerticalLayout {- alignment: center;- horizontal-stretch: 0;- LinkButton {- label: I18n.t("Choose…");- enabled: !root.data.busy;- clicked => { root.browse(); }- }- }- }- }+ if flick.interactive: ThinScrollbar {+ x: parent.width - self.width - 2px;+ y: 0;+ height: parent.height;+ viewport: parent.height;+ content: flick.viewport-height;+ offset: -flick.viewport-y;+ scrolled(to) => { flick.viewport-y = -to; }+ }+ }+}- FormRow {- label: I18n.upper("Shape");- stacked: root.narrow;-- HorizontalLayout {- spacing: 16px;-- ChipRow {- horizontal-stretch: 1;- options: root.aspects;- current: root.data.aspect;- enabled: !root.data.busy;- block: root.narrow;- changed(index) => { root.aspect-changed(index); }- }-- // The chosen frame at the row's end,- // drawn rather than described: the- // one thing on this screen that- // shows what the numbers mean.- if !root.narrow: VerticalLayout {- alignment: center;- horizontal-stretch: 0;- FrameShape {- room: 32px;- ratio: root.data.frame-aspect;- }- }- }- }+// ── the sheet ────────────────────────────────────────────────────────────- FormRow {- label: I18n.upper("Size");- stacked: root.narrow;-- HorizontalLayout {- spacing: 16px;-- ChipRow {- horizontal-stretch: 1;- options: root.sizes;- current: root.data.size;- enabled: !root.data.busy;- block: root.narrow;- changed(index) => { root.size-changed(index); }- }-- VerticalLayout {- alignment: center;- horizontal-stretch: 0;- Text {- text: root.data.size-readout;- color: Theme.fg-dim;- font-family: Theme.font-technical;- font-size: Theme.fs-sm;- }- }- }- }+// The new project's form, over the window: what the card at the head of+// the grid and the rail's first verb both open.+//+// Its parts are the launch screen's own — the plain field, the chip+// ladders, the ink-filled pill — rather than the other sheets' fields and+// buttons, because it is the launch screen's form and wears the launch+// screen's clothes; it is held here with them for that reason. The window+// root places it with the other sheets, since a sheet has to be declared+// where it is drawn, and it is drawn over everything.+export component NewProjectDialog inherits Modal {+ in property <StartData> data;+ /// The three ladders. The numbers behind each index are Rust's, so+ /// there is one place that knows what 4K is in pixels and that 29.97 is+ /// 30000 over 1001 — see `ASPECTS`, `SIZES` and `START_RATES` in the+ /// window.+ in property <[ChipOption]> aspects;+ in property <[ChipOption]> sizes;+ in property <[ChipOption]> rates;- FormRow {- label: I18n.upper("Frame rate");- last: true;- stacked: root.narrow;-- HorizontalLayout {- spacing: 16px;-- ChipRow {- horizontal-stretch: 1;- options: root.rates;- current: root.data.rate;- enabled: !root.data.busy;- block: root.narrow;- changed(index) => { root.rate-changed(index); }- }-- VerticalLayout {- alignment: center;- horizontal-stretch: 0;- Text {- text: root.data.rate-readout;- color: Theme.fg-dim;- font-family: Theme.font-technical;- font-size: Theme.fs-sm;- }- }- }- }+ callback name-edited(name: string);+ callback location-edited(path: string);+ callback browse();+ callback aspect-changed(index: int);+ callback size-changed(index: int);+ callback rate-changed(index: int);+ callback create();+ callback dismiss-error();- // The notice, above the button, wrapping to- // as many lines as the error takes: an- // elided error is half an error, and on a- // phone that is most of it.- if root.data.error != "": Rectangle {- height: notice.preferred-height + 4px;-- notice := Rectangle {- x: 0;- y: 4px;- width: parent.width;- height: self.preferred-height;- border-radius: Theme.r;- background: Theme.danger-soft;-- HorizontalLayout {- padding-left: 10px;- padding-right: 6px;- padding-top: 8px;- padding-bottom: 8px;- spacing: 8px;-- VerticalLayout {- alignment: start;- padding-top: 2px;- Icon {- glyph: Glyph.info;- size: 13px;- tint: Theme.danger;- }- }-- Text {- horizontal-stretch: 1;- text: root.data.error;- color: Theme.danger;- font-size: Theme.fs;- wrap: word-wrap;- }-- VerticalLayout {- alignment: start;- CopyChip {- text: root.data.error;- }- }-- VerticalLayout {- alignment: start;- Rectangle {- width: 22px;- height: 22px;- border-radius: Theme.r-xs;-- Icon {- x: (parent.width - self.width) / 2;- y: (parent.height - self.height) / 2;- glyph: Glyph.close;- size: 11px;- tint: Theme.danger;- }-- TouchArea {- mouse-cursor: pointer;- clicked => { root.dismiss-error(); }- }- }- }- }- }- }+ /// A phone held upright: every label over its value, every chip row+ /// across the width, the button across the width with its line under+ /// it.+ property <bool> narrow: root.width < 680px;+ /// A project needs somewhere to go. Everything else has a default.+ property <bool> can-create: !root.data.busy && root.data.location != "";- Rectangle { height: 22px; }-- // The button and the line about what- // pressing it does to the disk: side by- // side where there is room, the button- // across the width and the line under it on- // a phone, where a pill a thumb can miss is- // a pill that will be missed.- if !root.narrow: HorizontalLayout {- spacing: 18px;-- PillButton {- primary: true;- label: root.data.busy- ? I18n.t("Creating…")- : I18n.t("Create");- enabled: root.can-create;- clicked => { root.create(); }- }-- VerticalLayout {- alignment: center;- horizontal-stretch: 1;- Text {- text: I18n.t("The project folder is created now; the edit autosaves into it.");- color: Theme.fg-dim;- font-size: Theme.fs-sm;- wrap: word-wrap;- }- }- }+ open: root.data.composing;+ title: I18n.t("New project");+ glyph: Glyph.plus;+ // Not while creating: the sheet is what the notice lands on, and a+ // sheet dismissed out from under a create is a create nobody hears+ // about.+ dismissable: !root.data.busy;+ // Wide enough for five rates and their readout beside an 84px label,+ // and no wider than the window less a margin, on a phone.+ surface-width: Math.min(600px, root.width - 32px);++ // The caret goes to the name each time the sheet comes up, with the+ // name selected, so the default is replaced by typing over it. From+ // here rather than the field's own `init`: the sheet is built once,+ // hidden, when the window is, and shown many times after.+ changed open => {+ if (root.open) {+ name-field.take-focus();+ }+ }- if root.narrow: VerticalLayout {- spacing: 12px;-- PillButton {- primary: true;- block: true;- label: root.data.busy- ? I18n.t("Creating…")- : I18n.t("Create");- enabled: root.can-create;- clicked => { root.create(); }- }-- Text {- text: I18n.t("The project folder is created now; the edit autosaves into it.");- color: Theme.fg-dim;- font-size: Theme.fs-sm;- horizontal-alignment: center;- wrap: word-wrap;- }- }- }+ VerticalLayout {+ padding-left: root.narrow ? 18px : 26px;+ padding-right: root.narrow ? 18px : 26px;+ padding-top: 16px;+ padding-bottom: 22px;++ // What the form is for, before the form: the one line a person+ // should read before choosing.+ Text {+ text: I18n.t("These settings apply to the whole edit and cannot be changed later.");+ color: Theme.fg-muted;+ font-size: Theme.fs;+ wrap: word-wrap;+ }++ FormRow {+ label: I18n.upper("Name");+ stacked: root.narrow;++ name-field := PlainInput {+ text: root.data.name;+ placeholder: I18n.t("Untitled project");+ enabled: !root.data.busy;+ edited(text) => { root.name-edited(text); }+ accepted => { root.create(); }+ }+ }++ FormRow {+ label: I18n.upper("Location");+ stacked: root.narrow;++ HorizontalLayout {+ spacing: 12px;++ PlainInput {+ horizontal-stretch: 1;+ text: root.data.location;+ placeholder: I18n.t("Choose a folder");+ size: Theme.fs;+ face: Theme.font-technical;+ enabled: !root.data.busy;+ edited(text) => { root.location-edited(text); }+ accepted => { root.create(); }+ }++ VerticalLayout {+ alignment: center;+ horizontal-stretch: 0;+ LinkButton {+ label: I18n.t("Choose…");+ enabled: !root.data.busy;+ clicked => { root.browse(); }}+ }+ }+ }- // ── a glance at the history, under the form ──────────- if root.page == 0 && root.recents.length > 0: VerticalLayout {- Rectangle { height: root.narrow ? 32px : 44px; }+ FormRow {+ label: I18n.upper("Shape");+ stacked: root.narrow;- HorizontalLayout {- height: 24px;- spacing: 8px;+ HorizontalLayout {+ spacing: 16px;- Text {- text: I18n.t("Recent");- color: Theme.fg;- font-size: Theme.fs-xl;- font-weight: Theme.weight-title;- vertical-alignment: center;- }+ ChipRow {+ horizontal-stretch: 1;+ options: root.aspects;+ current: root.data.aspect;+ enabled: !root.data.busy;+ block: root.narrow;+ changed(index) => { root.aspect-changed(index); }+ }- // How many, quietly: a count is the one- // thing a shelf of cards does not say about- // itself until it is scrolled.- Text {- text: root.recents.length;- color: Theme.fg-dim;- font-family: Theme.font-technical;- font-size: Theme.fs-sm;- vertical-alignment: center;- }+ // The chosen frame at the row's end, drawn rather than+ // described: the one thing on this sheet that shows what+ // the numbers mean.+ if !root.narrow: VerticalLayout {+ alignment: center;+ horizontal-stretch: 0;+ FrameShape {+ room: 32px;+ ratio: root.data.frame-aspect;+ }+ }+ }+ }- Rectangle { horizontal-stretch: 1; }-- // Only when the strip is holding something- // back. A link to the rest of nothing is a- // link to this page.- if root.recents.length > strip.shown: VerticalLayout {- alignment: center;- LinkButton {- label: I18n.t("See all");- clicked => { root.view = 1; }- }- }+ FormRow {+ label: I18n.upper("Size");+ stacked: root.narrow;++ HorizontalLayout {+ spacing: 16px;++ ChipRow {+ horizontal-stretch: 1;+ options: root.sizes;+ current: root.data.size;+ enabled: !root.data.busy;+ block: root.narrow;+ changed(index) => { root.size-changed(index); }+ }++ VerticalLayout {+ alignment: center;+ horizontal-stretch: 0;+ Text {+ text: root.data.size-readout;+ color: Theme.fg-dim;+ font-family: Theme.font-technical;+ font-size: Theme.fs-sm;+ }+ }+ }+ }++ FormRow {+ label: I18n.upper("Frame rate");+ last: true;+ stacked: root.narrow;++ HorizontalLayout {+ spacing: 16px;++ ChipRow {+ horizontal-stretch: 1;+ options: root.rates;+ current: root.data.rate;+ enabled: !root.data.busy;+ block: root.narrow;+ changed(index) => { root.rate-changed(index); }+ }++ VerticalLayout {+ alignment: center;+ horizontal-stretch: 0;+ Text {+ text: root.data.rate-readout;+ color: Theme.fg-dim;+ font-family: Theme.font-technical;+ font-size: Theme.fs-sm;+ }+ }+ }+ }++ // The notice, above the button, wrapping to as many lines as the+ // error takes: an elided error is half an error, and on a phone+ // that is most of it.+ if root.data.error != "": Rectangle {+ height: notice.preferred-height + 4px;++ notice := Rectangle {+ x: 0;+ y: 4px;+ width: parent.width;+ height: self.preferred-height;+ border-radius: Theme.r;+ background: Theme.danger-soft;++ HorizontalLayout {+ padding-left: 10px;+ padding-right: 6px;+ padding-top: 8px;+ padding-bottom: 8px;+ spacing: 8px;++ VerticalLayout {+ alignment: start;+ padding-top: 2px;+ Icon {+ glyph: Glyph.info;+ size: 13px;+ tint: Theme.danger;}+ }- Rectangle { height: 14px; }+ Text {+ horizontal-stretch: 1;+ text: root.data.error;+ color: Theme.danger;+ font-size: Theme.fs;+ wrap: word-wrap;+ }- strip := RecentsGrid {- recents: root.recents;- enabled: !root.data.busy;- touchy: root.narrow;- one-row: true;- opened(path) => { root.open-recent(path); }- forgotten(path) => { root.forget-recent(path); }+ VerticalLayout {+ alignment: start;+ CopyChip {+ text: root.data.error;}}- // ── the whole history ────────────────────────────────- if root.page == 1: RecentsGrid {- recents: root.recents;- enabled: !root.data.busy;- touchy: root.narrow;- opened(path) => { root.open-recent(path); }- forgotten(path) => { root.forget-recent(path); }+ VerticalLayout {+ alignment: start;+ Rectangle {+ width: 22px;+ height: 22px;+ border-radius: Theme.r-xs;++ Icon {+ x: (parent.width - self.width) / 2;+ y: (parent.height - self.height) / 2;+ glyph: Glyph.close;+ size: 11px;+ tint: Theme.danger;+ }++ TouchArea {+ mouse-cursor: pointer;+ clicked => { root.dismiss-error(); }+ }+ }}}}}- if flick.interactive: ThinScrollbar {- x: parent.width - self.width - 2px;- y: 0;- height: parent.height;- viewport: parent.height;- content: flick.viewport-height;- offset: -flick.viewport-y;- scrolled(to) => { flick.viewport-y = -to; }+ Rectangle { height: 22px; }++ // The button and the line about what pressing it does to the disk:+ // side by side where there is room, the button across the width+ // and the line under it on a phone, where a pill a thumb can miss+ // is a pill that will be missed.+ if !root.narrow: HorizontalLayout {+ spacing: 18px;++ PillButton {+ primary: true;+ label: root.data.busy+ ? I18n.t("Creating…")+ : I18n.t("Create");+ enabled: root.can-create;+ clicked => { root.create(); }+ }++ VerticalLayout {+ alignment: center;+ horizontal-stretch: 1;+ Text {+ text: I18n.t("The project folder is created now; the edit autosaves into it.");+ color: Theme.fg-dim;+ font-size: Theme.fs-sm;+ wrap: word-wrap;+ }+ }+ }++ if root.narrow: VerticalLayout {+ spacing: 12px;++ PillButton {+ primary: true;+ block: true;+ label: root.data.busy+ ? I18n.t("Creating…")+ : I18n.t("Create");+ enabled: root.can-create;+ clicked => { root.create(); }+ }++ Text {+ text: I18n.t("The project folder is created now; the edit autosaves into it.");+ color: Theme.fg-dim;+ font-size: Theme.fs-sm;+ horizontal-alignment: center;+ wrap: word-wrap;+ }}}}