Skip to content

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

feat(mobile): the phone wears a shell of its own - the monitor over lanes that slide under a centred playhead, and a bar of tools that opens sheets

Jareer849e027587a6
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index 94de57de..e734b76f 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -316,6 +316,20 @@ sequenceDiagram
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.
+- **The phone shell** (`concat/ui/phone/`) is what the editor is on Android
+ and iOS - `platform::phone`, and `CONCAT_PHONE=1` on a desk for working
+ on it - in place of the title strip and the dock, never beside them. One
+ screen held upright: a top bar, the monitor, a transport, the lanes with
+ the playhead held at their middle (`TimelinePane::centred`: the view is
+ a fact about the playhead and follows every seek, zoom and resize), and
+ a bar of tools that is the library's pages with nothing selected and the
+ clip's verbs with a clip selected. A tool with more to say opens a sheet
+ over the lanes holding the same inspector page or library shelf the desk
+ shows, on a column that scrolls under a finger. The lanes' `finger` mode
+ makes a drag on the floor or the ruler a scrub and a tap on an empty
+ lane a release. Everything reads and reports through the `Editor`
+ global as the seats do; there is no phone-only state on the Rust side
+ beyond those two flags.
## 6. The document, undo and the file
diff --git a/src/crates/concat/locales/de.json b/src/crates/concat/locales/de.json
index a58a8065..97d09f93 100644
--- a/src/crates/concat/locales/de.json
+++ b/src/crates/concat/locales/de.json
@@ -642,6 +642,24 @@
"paneSwitcher.onlyPanel": "Einziges Panel",
"paneSwitcher.removePanel": "Panel entfernen",
"paneSwitcher.timeline": "Zeitleiste",
+ "phone.addATitle": "Titel hinzufügen",
+ "phone.back": "Zurück",
+ "phone.captions": "Untertitel",
+ "phone.duplicate": "Duplizieren",
+ "phone.edit": "Bearbeiten",
+ "phone.emptyLanes": "Tippe unten auf Medien, um ein Video zu holen; es landet hier.",
+ "phone.importMedia": "Medien importieren",
+ "phone.looks": "Oder ein Titel in einem dieser Looks:",
+ "phone.more": "Mehr",
+ "phone.noEffectYet": "Noch nichts auf diesem Clip. Tippe unten auf einen Effekt, um ihn hinzuzufügen.",
+ "phone.noMediaYet": "Noch nichts in der Ablage. Importiere ein Video, einen Ton oder ein Bild, um zu beginnen.",
+ "phone.project": "Projekt",
+ "phone.redo": "Wiederholen",
+ "phone.selectClipFirst": "Tippe zuerst auf einen Clip in der Zeitleiste: das hier gilt für den ausgewählten Clip.",
+ "phone.speak": "Sprechen",
+ "phone.split": "Teilen",
+ "phone.tapToAdd": "Tippe auf eine Datei, um sie am Abspielkopf auf die Zeitleiste zu legen.",
+ "phone.undo": "Rückgängig",
"presets.caption": "Untertitel",
"presets.default": "Titel",
"presets.elegant": "Elegant",
diff --git a/src/crates/concat/locales/en.json b/src/crates/concat/locales/en.json
index 8b73bbe6..63eb492b 100644
--- a/src/crates/concat/locales/en.json
+++ b/src/crates/concat/locales/en.json
@@ -642,6 +642,24 @@
"paneSwitcher.onlyPanel": "Only panel",
"paneSwitcher.removePanel": "Remove panel",
"paneSwitcher.timeline": "Timeline",
+ "phone.addATitle": "Add a title",
+ "phone.back": "Back",
+ "phone.captions": "Captions",
+ "phone.duplicate": "Duplicate",
+ "phone.edit": "Edit",
+ "phone.emptyLanes": "Tap Media below to bring in a video; it lands here.",
+ "phone.importMedia": "Import media",
+ "phone.looks": "Or a title in one of these looks:",
+ "phone.more": "More",
+ "phone.noEffectYet": "Nothing on this clip yet. Tap an effect below to add it.",
+ "phone.noMediaYet": "Nothing in the bin yet. Import a video, a sound or a picture to start.",
+ "phone.project": "Project",
+ "phone.redo": "Redo",
+ "phone.selectClipFirst": "Tap a clip on the timeline first: this goes on the selected clip.",
+ "phone.speak": "Speak",
+ "phone.split": "Split",
+ "phone.tapToAdd": "Tap a file to put it on the timeline at the playhead.",
+ "phone.undo": "Undo",
"presets.caption": "Caption",
"presets.default": "Title",
"presets.elegant": "Elegant",
diff --git a/src/crates/concat/locales/es.json b/src/crates/concat/locales/es.json
index e959c91a..d7a9ddba 100644
--- a/src/crates/concat/locales/es.json
+++ b/src/crates/concat/locales/es.json
@@ -642,6 +642,24 @@
"paneSwitcher.onlyPanel": "Único panel",
"paneSwitcher.removePanel": "Quitar panel",
"paneSwitcher.timeline": "Línea de tiempo",
+ "phone.addATitle": "Añadir un título",
+ "phone.back": "Atrás",
+ "phone.captions": "Subtítulos",
+ "phone.duplicate": "Duplicar",
+ "phone.edit": "Editar",
+ "phone.emptyLanes": "Toca Medios abajo para traer un vídeo; aparecerá aquí.",
+ "phone.importMedia": "Importar medios",
+ "phone.looks": "O un título con uno de estos estilos:",
+ "phone.more": "Más",
+ "phone.noEffectYet": "Aún no hay nada en este clip. Toca un efecto abajo para añadirlo.",
+ "phone.noMediaYet": "Aún no hay nada en la bandeja. Importa un vídeo, un sonido o una imagen para empezar.",
+ "phone.project": "Proyecto",
+ "phone.redo": "Rehacer",
+ "phone.selectClipFirst": "Toca primero un clip en la línea de tiempo: esto se aplica al clip seleccionado.",
+ "phone.speak": "Hablar",
+ "phone.split": "Dividir",
+ "phone.tapToAdd": "Toca un archivo para ponerlo en la línea de tiempo en el cabezal.",
+ "phone.undo": "Deshacer",
"presets.caption": "Subtítulo",
"presets.default": "Título",
"presets.elegant": "Elegante",
diff --git a/src/crates/concat/locales/fa.json b/src/crates/concat/locales/fa.json
index cd4e064b..d3f4004e 100644
--- a/src/crates/concat/locales/fa.json
+++ b/src/crates/concat/locales/fa.json
@@ -642,6 +642,24 @@
"paneSwitcher.onlyPanel": "فقط همین پنل",
"paneSwitcher.removePanel": "حذف پنل",
"paneSwitcher.timeline": "تایم‌لاین",
+ "phone.addATitle": "افزودن عنوان",
+ "phone.back": "بازگشت",
+ "phone.captions": "زیرنویس",
+ "phone.duplicate": "تکثیر",
+ "phone.edit": "ویرایش",
+ "phone.emptyLanes": "برای آوردن یک ویدیو روی «رسانه» در پایین بزنید؛ اینجا قرار می‌گیرد.",
+ "phone.importMedia": "وارد کردن رسانه",
+ "phone.looks": "یا عنوانی با یکی از این ظاهرها:",
+ "phone.more": "بیشتر",
+ "phone.noEffectYet": "هنوز چیزی روی این کلیپ نیست. برای افزودن، روی یک جلوه در پایین بزنید.",
+ "phone.noMediaYet": "هنوز چیزی در مخزن نیست. برای شروع یک ویدیو، صدا یا تصویر وارد کنید.",
+ "phone.project": "پروژه",
+ "phone.redo": "ازنو",
+ "phone.selectClipFirst": "ابتدا روی یک کلیپ در خط زمان بزنید: این روی کلیپ انتخاب‌شده اعمال می‌شود.",
+ "phone.speak": "گفتار",
+ "phone.split": "برش",
+ "phone.tapToAdd": "روی یک فایل بزنید تا در جای هد پخش روی خط زمان قرار بگیرد.",
+ "phone.undo": "واگرد",
"presets.caption": "زیرنویس",
"presets.default": "عنوان",
"presets.elegant": "ظریف",
diff --git a/src/crates/concat/locales/fr.json b/src/crates/concat/locales/fr.json
index ac07a794..953d9667 100644
--- a/src/crates/concat/locales/fr.json
+++ b/src/crates/concat/locales/fr.json
@@ -642,6 +642,24 @@
"paneSwitcher.onlyPanel": "Seul panneau",
"paneSwitcher.removePanel": "Retirer le panneau",
"paneSwitcher.timeline": "Timeline",
+ "phone.addATitle": "Ajouter un titre",
+ "phone.back": "Retour",
+ "phone.captions": "Sous-titres",
+ "phone.duplicate": "Dupliquer",
+ "phone.edit": "Modifier",
+ "phone.emptyLanes": "Touchez Médias ci-dessous pour importer une vidéo ; elle arrivera ici.",
+ "phone.importMedia": "Importer des médias",
+ "phone.looks": "Ou un titre dans l’un de ces styles :",
+ "phone.more": "Plus",
+ "phone.noEffectYet": "Rien sur ce clip pour l’instant. Touchez un effet ci-dessous pour l’ajouter.",
+ "phone.noMediaYet": "Rien dans le chutier pour l’instant. Importez une vidéo, un son ou une image pour commencer.",
+ "phone.project": "Projet",
+ "phone.redo": "Rétablir",
+ "phone.selectClipFirst": "Touchez d’abord un clip sur la timeline : ceci s’applique au clip sélectionné.",
+ "phone.speak": "Parler",
+ "phone.split": "Scinder",
+ "phone.tapToAdd": "Touchez un fichier pour le placer sur la timeline à la tête de lecture.",
+ "phone.undo": "Annuler",
"presets.caption": "Sous-titre",
"presets.default": "Titre",
"presets.elegant": "Élégant",
diff --git a/src/crates/concat/locales/hr.json b/src/crates/concat/locales/hr.json
index 9218b4bc..51d41677 100644
--- a/src/crates/concat/locales/hr.json
+++ b/src/crates/concat/locales/hr.json
@@ -642,6 +642,24 @@
"paneSwitcher.onlyPanel": "Samo ploča",
"paneSwitcher.removePanel": "Ukloni ploču",
"paneSwitcher.timeline": "Vremenska linija",
+ "phone.addATitle": "Dodaj naslov",
+ "phone.back": "Natrag",
+ "phone.captions": "Titlovi",
+ "phone.duplicate": "Dupliciraj",
+ "phone.edit": "Uredi",
+ "phone.emptyLanes": "Dodirni Mediji ispod da uvezeš video; pojavit će se ovdje.",
+ "phone.importMedia": "Uvezi medije",
+ "phone.looks": "Ili naslov u jednom od ovih izgleda:",
+ "phone.more": "Više",
+ "phone.noEffectYet": "Na ovom isječku još nema ničega. Dodirni efekt ispod da ga dodaš.",
+ "phone.noMediaYet": "U spremniku još nema ničega. Uvezi video, zvuk ili sliku za početak.",
+ "phone.project": "Projekt",
+ "phone.redo": "Ponovi",
+ "phone.selectClipFirst": "Prvo dodirni isječak na vremenskoj crti: ovo se primjenjuje na odabrani isječak.",
+ "phone.speak": "Izgovori",
+ "phone.split": "Razdvoji",
+ "phone.tapToAdd": "Dodirni datoteku da je staviš na vremensku crtu na položaju glave.",
+ "phone.undo": "Poništi",
"presets.caption": "Titl",
"presets.default": "Naslov",
"presets.elegant": "Elegantno",
diff --git a/src/crates/concat/locales/it.json b/src/crates/concat/locales/it.json
index 371af5eb..5df2cfa6 100644
--- a/src/crates/concat/locales/it.json
+++ b/src/crates/concat/locales/it.json
@@ -642,6 +642,24 @@
"paneSwitcher.onlyPanel": "Unico pannello",
"paneSwitcher.removePanel": "Rimuovi pannello",
"paneSwitcher.timeline": "Timeline",
+ "phone.addATitle": "Aggiungi un titolo",
+ "phone.back": "Indietro",
+ "phone.captions": "Sottotitoli",
+ "phone.duplicate": "Duplica",
+ "phone.edit": "Modifica",
+ "phone.emptyLanes": "Tocca Media qui sotto per importare un video; comparirà qui.",
+ "phone.importMedia": "Importa media",
+ "phone.looks": "Oppure un titolo in uno di questi stili:",
+ "phone.more": "Altro",
+ "phone.noEffectYet": "Ancora niente su questa clip. Tocca un effetto qui sotto per aggiungerlo.",
+ "phone.noMediaYet": "Il cestello è ancora vuoto. Importa un video, un suono o un’immagine per iniziare.",
+ "phone.project": "Progetto",
+ "phone.redo": "Ripeti",
+ "phone.selectClipFirst": "Tocca prima una clip sulla timeline: questo si applica alla clip selezionata.",
+ "phone.speak": "Parla",
+ "phone.split": "Dividi",
+ "phone.tapToAdd": "Tocca un file per metterlo sulla timeline alla testina.",
+ "phone.undo": "Annulla",
"presets.caption": "Sottotitolo",
"presets.default": "Titolo",
"presets.elegant": "Elegante",
diff --git a/src/crates/concat/locales/ja.json b/src/crates/concat/locales/ja.json
index ee32624b..59611767 100644
--- a/src/crates/concat/locales/ja.json
+++ b/src/crates/concat/locales/ja.json
@@ -642,6 +642,24 @@
"paneSwitcher.onlyPanel": "唯一のパネル",
"paneSwitcher.removePanel": "パネルを削除",
"paneSwitcher.timeline": "タイムライン",
+ "phone.addATitle": "タイトルを追加",
+ "phone.back": "戻る",
+ "phone.captions": "字幕",
+ "phone.duplicate": "複製",
+ "phone.edit": "編集",
+ "phone.emptyLanes": "下の「メディア」をタップして動画を読み込むと、ここに置かれます。",
+ "phone.importMedia": "メディアを読み込む",
+ "phone.looks": "または、次のスタイルでタイトルを追加:",
+ "phone.more": "その他",
+ "phone.noEffectYet": "このクリップにはまだ何もありません。下のエフェクトをタップして追加してください。",
+ "phone.noMediaYet": "ビンにはまだ何もありません。動画、音声、画像を読み込んで始めましょう。",
+ "phone.project": "プロジェクト",
+ "phone.redo": "やり直す",
+ "phone.selectClipFirst": "先にタイムラインのクリップをタップしてください。これは選択中のクリップに適用されます。",
+ "phone.speak": "読み上げ",
+ "phone.split": "分割",
+ "phone.tapToAdd": "ファイルをタップすると、再生ヘッドの位置でタイムラインに置かれます。",
+ "phone.undo": "元に戻す",
"presets.caption": "字幕",
"presets.default": "タイトル",
"presets.elegant": "エレガント",
diff --git a/src/crates/concat/locales/ko.json b/src/crates/concat/locales/ko.json
index fe6fb75a..81dcc663 100644
--- a/src/crates/concat/locales/ko.json
+++ b/src/crates/concat/locales/ko.json
@@ -642,6 +642,24 @@
"paneSwitcher.onlyPanel": "유일한 패널",
"paneSwitcher.removePanel": "패널 제거",
"paneSwitcher.timeline": "타임라인",
+ "phone.addATitle": "제목 추가",
+ "phone.back": "뒤로",
+ "phone.captions": "자막",
+ "phone.duplicate": "복제",
+ "phone.edit": "편집",
+ "phone.emptyLanes": "아래의 미디어를 탭해 영상을 가져오면 여기에 놓입니다.",
+ "phone.importMedia": "미디어 가져오기",
+ "phone.looks": "또는 다음 스타일 중 하나로 제목 추가:",
+ "phone.more": "더보기",
+ "phone.noEffectYet": "이 클립에는 아직 아무것도 없습니다. 아래 효과를 탭해 추가하세요.",
+ "phone.noMediaYet": "빈에 아직 아무것도 없습니다. 영상, 소리 또는 사진을 가져와 시작하세요.",
+ "phone.project": "프로젝트",
+ "phone.redo": "다시 실행",
+ "phone.selectClipFirst": "먼저 타임라인의 클립을 탭하세요. 이 항목은 선택한 클립에 적용됩니다.",
+ "phone.speak": "읽어주기",
+ "phone.split": "분할",
+ "phone.tapToAdd": "파일을 탭하면 재생 헤드 위치에서 타임라인에 놓입니다.",
+ "phone.undo": "실행 취소",
"presets.caption": "자막",
"presets.default": "자막",
"presets.elegant": "우아함",
diff --git a/src/crates/concat/locales/pt-BR.json b/src/crates/concat/locales/pt-BR.json
index 382f9b13..6c00f925 100644
--- a/src/crates/concat/locales/pt-BR.json
+++ b/src/crates/concat/locales/pt-BR.json
@@ -642,6 +642,24 @@
"paneSwitcher.onlyPanel": "Único painel",
"paneSwitcher.removePanel": "Remover painel",
"paneSwitcher.timeline": "Linha do tempo",
+ "phone.addATitle": "Adicionar um título",
+ "phone.back": "Voltar",
+ "phone.captions": "Legendas",
+ "phone.duplicate": "Duplicar",
+ "phone.edit": "Editar",
+ "phone.emptyLanes": "Toque em Mídia abaixo para trazer um vídeo; ele aparecerá aqui.",
+ "phone.importMedia": "Importar mídia",
+ "phone.looks": "Ou um título em um destes estilos:",
+ "phone.more": "Mais",
+ "phone.noEffectYet": "Ainda não há nada neste clipe. Toque em um efeito abaixo para adicioná-lo.",
+ "phone.noMediaYet": "Ainda não há nada na bandeja. Importe um vídeo, um som ou uma imagem para começar.",
+ "phone.project": "Projeto",
+ "phone.redo": "Refazer",
+ "phone.selectClipFirst": "Toque primeiro em um clipe na linha do tempo: isto se aplica ao clipe selecionado.",
+ "phone.speak": "Falar",
+ "phone.split": "Dividir",
+ "phone.tapToAdd": "Toque em um arquivo para colocá-lo na linha do tempo, no cursor de reprodução.",
+ "phone.undo": "Desfazer",
"presets.caption": "Legenda",
"presets.default": "Título",
"presets.elegant": "Elegante",
diff --git a/src/crates/concat/locales/ru.json b/src/crates/concat/locales/ru.json
index 28cff5f0..962013d7 100644
--- a/src/crates/concat/locales/ru.json
+++ b/src/crates/concat/locales/ru.json
@@ -642,6 +642,24 @@
"paneSwitcher.onlyPanel": "Единственная панель",
"paneSwitcher.removePanel": "Убрать панель",
"paneSwitcher.timeline": "Таймлайн",
+ "phone.addATitle": "Добавить титр",
+ "phone.back": "Назад",
+ "phone.captions": "Субтитры",
+ "phone.duplicate": "Дублировать",
+ "phone.edit": "Правка",
+ "phone.emptyLanes": "Коснитесь «Медиа» внизу, чтобы добавить видео; оно появится здесь.",
+ "phone.importMedia": "Импортировать медиа",
+ "phone.looks": "Или титр в одном из этих стилей:",
+ "phone.more": "Ещё",
+ "phone.noEffectYet": "На этом клипе пока ничего нет. Коснитесь эффекта ниже, чтобы добавить его.",
+ "phone.noMediaYet": "В корзине пока пусто. Импортируйте видео, звук или картинку, чтобы начать.",
+ "phone.project": "Проект",
+ "phone.redo": "Повторить",
+ "phone.selectClipFirst": "Сначала коснитесь клипа на таймлайне: это применяется к выбранному клипу.",
+ "phone.speak": "Озвучить",
+ "phone.split": "Разрезать",
+ "phone.tapToAdd": "Коснитесь файла, чтобы поставить его на таймлайн в позицию курсора.",
+ "phone.undo": "Отменить",
"presets.caption": "Субтитр",
"presets.default": "Титр",
"presets.elegant": "Элегантный",
diff --git a/src/crates/concat/locales/tr.json b/src/crates/concat/locales/tr.json
index f9198a66..854f4bc9 100644
--- a/src/crates/concat/locales/tr.json
+++ b/src/crates/concat/locales/tr.json
@@ -642,6 +642,24 @@
"paneSwitcher.onlyPanel": "Tek panel",
"paneSwitcher.removePanel": "Paneli kaldır",
"paneSwitcher.timeline": "Zaman çizelgesi",
+ "phone.addATitle": "Başlık ekle",
+ "phone.back": "Geri",
+ "phone.captions": "Altyazı",
+ "phone.duplicate": "Çoğalt",
+ "phone.edit": "Düzenle",
+ "phone.emptyLanes": "Bir video getirmek için aşağıdaki Medya’ya dokunun; buraya gelir.",
+ "phone.importMedia": "Medya içe aktar",
+ "phone.looks": "Ya da şu görünümlerden biriyle bir başlık:",
+ "phone.more": "Daha fazla",
+ "phone.noEffectYet": "Bu klipte henüz bir şey yok. Eklemek için aşağıdaki bir efekte dokunun.",
+ "phone.noMediaYet": "Kutuda henüz bir şey yok. Başlamak için bir video, ses ya da görsel içe aktarın.",
+ "phone.project": "Proje",
+ "phone.redo": "Yinele",
+ "phone.selectClipFirst": "Önce zaman çizelgesinde bir klibe dokunun: bu, seçili klibe uygulanır.",
+ "phone.speak": "Seslendir",
+ "phone.split": "Böl",
+ "phone.tapToAdd": "Bir dosyaya dokunarak onu oynatma kafasının olduğu yerde zaman çizelgesine koyun.",
+ "phone.undo": "Geri al",
"presets.caption": "Altyazı",
"presets.default": "Yazı",
"presets.elegant": "Zarif",
diff --git a/src/crates/concat/locales/zh-Hans.json b/src/crates/concat/locales/zh-Hans.json
index 0edca120..4f8ec47e 100644
--- a/src/crates/concat/locales/zh-Hans.json
+++ b/src/crates/concat/locales/zh-Hans.json
@@ -642,6 +642,24 @@
"paneSwitcher.onlyPanel": "唯一面板",
"paneSwitcher.removePanel": "移除面板",
"paneSwitcher.timeline": "时间线",
+ "phone.addATitle": "添加标题",
+ "phone.back": "返回",
+ "phone.captions": "字幕",
+ "phone.duplicate": "复制",
+ "phone.edit": "编辑",
+ "phone.emptyLanes": "点按下方的“媒体”导入视频,它会出现在这里。",
+ "phone.importMedia": "导入媒体",
+ "phone.looks": "或以下面任一样式添加标题:",
+ "phone.more": "更多",
+ "phone.noEffectYet": "这个片段上还没有任何效果。点按下方的效果即可添加。",
+ "phone.noMediaYet": "素材库还是空的。导入一段视频、音频或图片开始吧。",
+ "phone.project": "项目",
+ "phone.redo": "重做",
+ "phone.selectClipFirst": "请先点按时间线上的片段:这会应用到所选片段。",
+ "phone.speak": "朗读",
+ "phone.split": "分割",
+ "phone.tapToAdd": "点按文件,即可把它放到时间线上播放头所在的位置。",
+ "phone.undo": "撤销",
"presets.caption": "字幕",
"presets.default": "标题",
"presets.elegant": "优雅",
diff --git a/src/crates/concat/locales/zh-TW.json b/src/crates/concat/locales/zh-TW.json
index ae640323..51cd6471 100644
--- a/src/crates/concat/locales/zh-TW.json
+++ b/src/crates/concat/locales/zh-TW.json
@@ -642,6 +642,24 @@
"paneSwitcher.onlyPanel": "唯一面板",
"paneSwitcher.removePanel": "移除面板",
"paneSwitcher.timeline": "時間軸",
+ "phone.addATitle": "新增標題",
+ "phone.back": "返回",
+ "phone.captions": "字幕",
+ "phone.duplicate": "複製",
+ "phone.edit": "編輯",
+ "phone.emptyLanes": "點一下下方的「媒體」匯入影片,它會出現在這裡。",
+ "phone.importMedia": "匯入媒體",
+ "phone.looks": "或以下列任一樣式新增標題:",
+ "phone.more": "更多",
+ "phone.noEffectYet": "這個片段上還沒有任何效果。點一下下方的效果即可加入。",
+ "phone.noMediaYet": "素材庫還是空的。匯入一段影片、音訊或圖片開始吧。",
+ "phone.project": "專案",
+ "phone.redo": "重做",
+ "phone.selectClipFirst": "請先點一下時間軸上的片段:這會套用到所選片段。",
+ "phone.speak": "朗讀",
+ "phone.split": "分割",
+ "phone.tapToAdd": "點一下檔案,即可把它放到時間軸上播放頭所在的位置。",
+ "phone.undo": "復原",
"presets.caption": "字幕",
"presets.default": "標題",
"presets.elegant": "優雅",
diff --git a/src/crates/concat/src/lib.rs b/src/crates/concat/src/lib.rs
index bfb26a20..d464f4a0 100644
--- a/src/crates/concat/src/lib.rs
+++ b/src/crates/concat/src/lib.rs
@@ -135,12 +135,17 @@ pub fn run() -> Result<(), slint::PlatformError> {
let app = App::new()?;
app.set_macos(platform::MACOS);
+ // A phone wears the phone shell - see ui/phone/ - and its lanes keep
+ // the playhead at their middle; the strip and the dock are the desk's.
+ let phone = platform::phone();
+ app.set_phone(phone);
// The user's own packages - imported looks, and any effect folder they
// or the community wrote - sit beside the built-ins from the first
// frame. One that will not load is skipped, and its reason is the
// first thing the window says.
let mut studio = Studio::new(host);
+ studio.set_phone(phone);
studio.reload_packages(false);
studio.watch_packages();
let dark = studio.prefs.dark.unwrap_or(true);
diff --git a/src/crates/concat/src/panes/timeline.rs b/src/crates/concat/src/panes/timeline.rs
index adabc123..70c5bff3 100644
--- a/src/crates/concat/src/panes/timeline.rs
+++ b/src/crates/concat/src/panes/timeline.rs
@@ -99,6 +99,14 @@ pub struct TimelinePane {
/// The lanes' width on screen, in logical pixels; zero until Slint has
/// said, and then every clip is published.
pub width: f32,
+ /// The playhead is held at the middle of the lanes and the cut moves
+ /// under it: the phone's timeline, where a finger drags the lanes to
+ /// scrub. `scroll_left` is then a fact about the playhead - half a
+ /// screen before it, negative at the start of the cut, which is what
+ /// puts the first clip's head at the middle - and the view follows every
+ /// seek, every zoom and every resize. Off, the view is its own: it pages
+ /// after the playhead and scrolls where it is put, as on a desk.
+ pub centred: bool,
}
impl Default for TimelinePane {
@@ -111,6 +119,7 @@ impl Default for TimelinePane {
pan_mode: false,
lane_view: HashMap::new(),
width: 0.0,
+ centred: false,
}
}
}
@@ -149,7 +158,11 @@ impl TimelinePane {
}
TimelineMsg::Hovered(seconds) => studio.hover(seconds),
TimelineMsg::HoverEnded => studio.end_hover(),
- TimelineMsg::Scrolled(seconds) => self.scroll_left = seconds.max(0.0),
+ // A centred view may be scrolled off its playhead - a clip
+ // dragged to the lanes' edge scrolls them - and comes back to it
+ // at the next seek; the floor at zero is the desk's, where the
+ // start of the cut is the left edge and nothing is before it.
+ TimelineMsg::Scrolled(seconds) => self.scrolled(seconds),
TimelineMsg::Zoomed { factor, anchor } => {
let anchor = if anchor < 0.0 {
self.default_anchor(studio)
@@ -157,30 +170,58 @@ impl TimelinePane {
anchor
};
self.zoom(factor, anchor);
+ self.recentre(studio.playhead);
}
TimelineMsg::ZoomToFit(width) => {
let span = studio.duration().max(1.0) * 1.05;
if width > 1.0 {
self.seconds_per_pixel = (span / width).clamp(ZOOM_IN_LIMIT, ZOOM_OUT_LIMIT);
self.scroll_left = 0.0;
+ self.recentre(studio.playhead);
}
}
TimelineMsg::ZoomIn => {
let anchor = self.default_anchor(studio);
self.zoom(1.0 / ZOOM_STEP, anchor);
+ self.recentre(studio.playhead);
}
TimelineMsg::ZoomOut => {
let anchor = self.default_anchor(studio);
self.zoom(ZOOM_STEP, anchor);
+ self.recentre(studio.playhead);
+ }
+ TimelineMsg::Resized(width) => {
+ self.width = width.max(0.0);
+ self.recentre(studio.playhead);
}
- TimelineMsg::Resized(width) => self.width = width.max(0.0),
TimelineMsg::Reset => {
self.scroll_left = 0.0;
self.lane_view.clear();
+ self.recentre(studio.playhead);
}
}
}
+ /// The lanes scrolled to `seconds` at their left edge. See `Scrolled`.
+ fn scrolled(&mut self, seconds: f32) {
+ self.scroll_left = if self.centred {
+ seconds
+ } else {
+ seconds.max(0.0)
+ };
+ }
+
+ /// Puts the playhead at the middle of the lanes, when the view is the
+ /// centred kind; nothing otherwise, and nothing until the lanes have
+ /// said how wide they are. Called after every move of the playhead and
+ /// every change of the view's scale or size, so the two never come
+ /// apart.
+ pub fn recentre(&mut self, playhead: f32) {
+ if self.centred && self.width > 0.0 {
+ self.scroll_left = playhead - self.width * self.seconds_per_pixel / 2.0;
+ }
+ }
+
/// The anchor point for a zoom that has no pointer position (e.g. keyboard
/// shortcut or tray buttons): the playhead if on screen, else the center of
/// the visible timeline.
@@ -206,7 +247,8 @@ impl TimelinePane {
let after = (before * factor).clamp(ZOOM_IN_LIMIT, ZOOM_OUT_LIMIT);
self.seconds_per_pixel = after;
if anchor >= 0.0 {
- self.scroll_left = (anchor - (anchor - self.scroll_left) * (after / before)).max(0.0);
+ let left = anchor - (anchor - self.scroll_left) * (after / before);
+ self.scroll_left = if self.centred { left } else { left.max(0.0) };
}
}
@@ -270,6 +312,33 @@ mod tests {
assert!(TimelinePane::shows(None, 1e9, 0.0), "no span, everything");
}
+ #[test]
+ fn a_centred_view_keeps_the_playhead_in_the_middle() {
+ let mut view = pane(400.0, 0.0, 0.05);
+ view.centred = true;
+ // A 400 px screen at 0.05 s/px is 20 s; the playhead at 3 s puts
+ // the left edge 7 s before the start of the cut.
+ view.recentre(3.0);
+ assert!(
+ (view.scroll_left + 7.0).abs() < 1e-6,
+ "{}",
+ view.scroll_left
+ );
+ assert!(((3.0 - view.scroll_left) / view.seconds_per_pixel - 200.0).abs() < 1e-3);
+ // A zoom about the playhead keeps it where it is: the middle.
+ view.zoom(0.5, 3.0);
+ assert!(((3.0 - view.scroll_left) / view.seconds_per_pixel - 200.0).abs() < 1e-3);
+ // A scroll may take the view off its playhead, before zero included.
+ view.scrolled(-4.0);
+ assert_eq!(view.scroll_left, -4.0);
+ // Not centred, the desk's floor holds.
+ view.centred = false;
+ view.recentre(3.0);
+ assert_eq!(view.scroll_left, -4.0);
+ view.scrolled(-4.0);
+ assert_eq!(view.scroll_left, 0.0);
+ }
+
#[test]
fn zoom_keeps_the_anchor_under_the_pointer_and_stays_in_range() {
let mut view = pane(1000.0, 10.0, 0.1);
diff --git a/src/crates/concat/src/platform.rs b/src/crates/concat/src/platform.rs
index 13207463..eb418f2f 100644
--- a/src/crates/concat/src/platform.rs
+++ b/src/crates/concat/src/platform.rs
@@ -144,6 +144,17 @@ impl CustomApplicationHandler for DropHandler {
/// Whether the window draws the macOS traffic lights over its own strip.
pub const MACOS: bool = cfg!(target_os = "macos");
+/// Whether the window is a phone's: one screen, held upright, driven by a
+/// finger. The editor then wears the phone shell (ui/phone/) rather than
+/// the strip and the dock, whatever the screen's size - a tablet is a big
+/// phone here, not a small desk. True on Android and iOS; on a desk,
+/// `CONCAT_PHONE=1` in the environment asks for the same shell in a window,
+/// which is how the phone layout is worked on without a phone.
+pub fn phone() -> bool {
+ cfg!(any(target_os = "android", target_os = "ios"))
+ || std::env::var_os("CONCAT_PHONE").is_some_and(|value| !value.is_empty() && value != "0")
+}
+
/// Chooses and installs the backend, and hands back the device the
/// renderer and the engine's compositor share, when there is one.
///
diff --git a/src/crates/concat/src/studio.rs b/src/crates/concat/src/studio.rs
index c18eefb5..983092fb 100644
--- a/src/crates/concat/src/studio.rs
+++ b/src/crates/concat/src/studio.rs
@@ -2316,7 +2316,12 @@ impl Studio {
// The view follows: a playhead that runs off the
// right edge, or sits off the left, pages the lanes
// to it, the way every editor keeps the cut in view.
- if let Some((low, high)) = studio.lanes.published_span() {
+ // A phone's lanes glide instead, the playhead held
+ // at their middle.
+ if studio.lanes.centred {
+ let playhead = studio.playhead;
+ studio.lanes.recentre(playhead);
+ } else if let Some((low, high)) = studio.lanes.published_span() {
let screen = (high - low) / 3.0;
let left = studio.lanes.scroll_left;
if screen > 0.0
@@ -2354,6 +2359,8 @@ impl Studio {
if self.prefs.playhead_stops_at_end {
self.playhead = self.playhead.min(self.duration().max(0.0));
}
+ // A phone's lanes move under a playhead held at their middle.
+ self.lanes.recentre(self.playhead);
self.host.playback.seek(f64::from(self.playhead));
self.request_preview();
}
@@ -6431,6 +6438,14 @@ impl Studio {
sync(&models.dividers, out.dividers);
}
+ /// 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) {
+ self.lanes.centred = phone;
+ let playhead = self.playhead;
+ self.lanes.recentre(playhead);
+ }
+
/// Shows the compact dock, or the wide one, keeping whichever is put
/// away whole; see `COMPACT_WIDTH`.
pub fn set_compact(&mut self, compact: bool) {
@@ -8858,6 +8873,12 @@ impl Studio {
self.split_at(at, true);
}
"select-all" => self.select_all(),
+ // The phone's way out of the clip tools: nothing selected, the
+ // way a press on an empty lane leaves it.
+ "deselect" => {
+ self.flush_commit();
+ self.selection.clear();
+ }
// ⇧⌫, from the key table; plain ⌫ comes in as its own callback.
"ripple-delete" => self.ripple_delete_selected(),
"copy" | "duplicate" | "mute" => {
diff --git a/src/crates/concat/ui/app.slint b/src/crates/concat/ui/app.slint
index 91cced2f..36750a53 100644
--- a/src/crates/concat/ui/app.slint
+++ b/src/crates/concat/ui/app.slint
@@ -32,6 +32,7 @@ import { Editor } from "editor.slint";
import { PaneKind, Panes } from "workspace/pane-switcher.slint";
import { ChipOption, NewProjectDialog, RecentProjectData, StartData, StartScreen } from "start.slint";
import { TitleBar } from "title-bar.slint";
+import { PhoneEditor } from "phone/editor.slint";
import {
AppliedEntryData, AppliedParamData, CatalogueEntryData, Library, LibraryViewData,
} from "inspector/clip-inspector.slint";
@@ -78,12 +79,16 @@ export component App inherits Window {
// One line rather than a weight on every Text: everything inherits the
// compensated body weight, and only titles override it. See theme.slint.
default-font-weight: Theme.weight-body;
- preferred-width: 1400px;
- preferred-height: 900px;
+ // A phone's window is its screen, whatever these say; on a desk asked
+ // for the phone shell (CONCAT_PHONE, see platform.rs) they are a
+ // phone's shape, so the layout is seen as a phone would show it.
+ preferred-width: root.phone ? 420px : 1400px;
+ preferred-height: root.phone ? 880px : 900px;
// Below this the three columns cannot all hold their minimum and the panes
- // start eating each other.
- min-width: 900px;
- min-height: 560px;
+ // start eating each other. The phone shell has no columns, and a phone
+ // is narrower than this on every side.
+ min-width: root.phone ? 320px : 900px;
+ min-height: root.phone ? 480px : 560px;
// So the shortcuts work before anything has been clicked. Without it the
// window opens with nothing focused, and a key would have nowhere to be
// delivered from until the first press landed somewhere.
@@ -153,6 +158,11 @@ export component App inherits Window {
in property <string> project-name: I18n.t("common.untitledProject");
in property <string> project-status: I18n.t("common.saved");
in property <bool> macos;
+ /// The window is a phone's: one screen, held upright, driven by a
+ /// finger. The editor is then the phone shell (ui/phone/) - no title
+ /// strip, no dock - and the launch screen carries its own verbs, as it
+ /// does whenever it is narrow. Set once from Rust; see platform::phone.
+ in property <bool> phone;
/// The File / Edit / View menus. Built in Rust like every other menu here,
/// because what belongs on them depends on the project.
@@ -461,7 +471,10 @@ export component App inherits Window {
padding-left: root.safe-area-insets.left;
padding-right: root.safe-area-insets.right;
- TitleBar {
+ // No strip on a phone: its menus, its window buttons and its
+ // drag region are all a desk's, and the phone shell's top bar
+ // carries the two verbs that are not.
+ if !root.phone: TitleBar {
macos: root.macos;
minimal: root.on-start;
deep: root.on-start;
@@ -505,9 +518,22 @@ export component App inherits Window {
// nothing is passed to it: it is a box with four seats in it, and
// the views inside those seats reach the state directly. See
// editor.slint.
- if !root.on-start: Workspace {
+ if !root.on-start && !root.phone: Workspace {
vertical-stretch: 1;
}
+
+ // The phone's editor reads the same global; only the shell round
+ // it differs. Its three verbs that are the window's - export,
+ // settings, closing the project - go where the strip's went.
+ if !root.on-start && root.phone: PhoneEditor {
+ vertical-stretch: 1;
+ project-name: root.project-name;
+ status: root.project-status;
+
+ export-clicked => { root.export-clicked(); }
+ open-settings => { root.open-settings(); }
+ close-project => { root.app-menu-selected("close-project"); }
+ }
}
}
diff --git a/src/crates/concat/ui/phone/controls.slint b/src/crates/concat/ui/phone/controls.slint
new file mode 100644
index 00000000..c8b5db20
--- /dev/null
+++ b/src/crates/concat/ui/phone/controls.slint
@@ -0,0 +1,146 @@
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// SPDX-FileCopyrightText: 2026 Jareer and Concat contributors
+
+import { Theme } from "../theme/theme.slint";
+import { Glyph, Icon } from "../icons.slint";
+
+// The phone shell's own controls.
+//
+// Everything here is sized for a finger. Forty-four pixels is the smallest
+// target a thumb lands on reliably, so no button below is smaller, and
+// nothing answers a hover: a finger has none, and a control that lights
+// under a pointer lights under a finger only for as long as it presses.
+// The panes' controls - the inspector's fields, the library's cards - are
+// used as they are, inside a sheet that scrolls under a finger; these are
+// the shell round them.
+
+/// A round button: the top bar's, and the transport's.
+export component RoundButton inherits Rectangle {
+ in property <Glyph> glyph;
+ /// The accessible name.
+ in property <string> label;
+ in property <bool> enabled: true;
+ /// Filled with the accent: the one control on its row worth reaching
+ /// for blind, which is Play.
+ in property <bool> accent;
+ in property <length> size: 44px;
+ in property <length> icon-size: 18px;
+
+ callback clicked();
+
+ width: root.size;
+ height: root.size;
+ border-radius: root.size / 2;
+ opacity: root.enabled ? 1.0 : 0.35;
+ background: root.accent
+ ? (touch.pressed ? Theme.accent-hover : Theme.accent)
+ : touch.pressed ? Theme.field-active
+ : Colors.transparent;
+
+ animate background { duration: 100ms; easing: cubic-bezier(0.4, 0, 0.2, 1); }
+
+ Icon {
+ x: (parent.width - self.width) / 2;
+ y: (parent.height - self.height) / 2;
+ glyph: root.glyph;
+ size: root.icon-size;
+ tint: root.accent ? Theme.on-accent : Theme.fg;
+ }
+
+ touch := TouchArea {
+ enabled: root.enabled;
+ clicked => { root.clicked(); }
+ }
+}
+
+/// One verb on the bar along the foot of the screen: a mark over its word,
+/// the way every phone editor lays its tools out, because a word alone is
+/// a menu and a mark alone is a guess.
+export component ToolItem inherits Rectangle {
+ in property <Glyph> glyph;
+ in property <string> label;
+ in property <bool> enabled: true;
+ /// Lit: the sheet this opens is the one up.
+ in property <bool> current;
+
+ callback clicked();
+
+ width: 68px;
+ border-radius: Theme.r;
+ opacity: root.enabled ? 1.0 : 0.35;
+ background: touch.pressed ? Theme.field-active : Colors.transparent;
+
+ animate background { duration: 100ms; easing: cubic-bezier(0.4, 0, 0.2, 1); }
+
+ VerticalLayout {
+ alignment: center;
+ spacing: 5px;
+ padding-left: 4px;
+ padding-right: 4px;
+
+ HorizontalLayout {
+ alignment: center;
+ Icon {
+ glyph: root.glyph;
+ size: 22px;
+ tint: root.current ? Theme.accent : Theme.fg;
+ }
+ }
+
+ Text {
+ text: root.label;
+ color: root.current ? Theme.accent : Theme.fg-muted;
+ font-size: Theme.fs-sm;
+ horizontal-alignment: center;
+ overflow: elide;
+ }
+ }
+
+ touch := TouchArea {
+ enabled: root.enabled;
+ clicked => { root.clicked(); }
+ }
+}
+
+/// A row of ToolItems that slides sideways under a finger when there are
+/// more of them than the screen is wide - which, with the clip's verbs,
+/// there are.
+export component ToolStrip inherits Flickable {
+ content-width: row.width;
+ content-height: self.height;
+
+ row := HorizontalLayout {
+ x: 0;
+ y: 0;
+ width: Math.max(root.width, self.preferred-width);
+ height: root.height;
+ alignment: start;
+ padding-left: 6px;
+ padding-right: 6px;
+ spacing: 2px;
+
+ @children
+ }
+}
+
+/// A column that scrolls under a finger.
+///
+/// A Flickable, unlike the panes' wheel scroller: it takes a drag off its
+/// children once the drag has travelled far enough to be one, which is the
+/// only way a finger scrolls a column that is mostly controls. It takes
+/// only the axis it can move on, so a slider dragged sideways keeps its
+/// drag and a column dragged up and down scrolls.
+export component PhoneScroll inherits Flickable {
+ content-width: self.width;
+ content-height: column.height;
+
+ column := VerticalLayout {
+ x: 0;
+ y: 0;
+ width: root.width;
+ height: Math.max(root.height, self.preferred-height);
+ alignment: start;
+
+ @children
+ }
+}
diff --git a/src/crates/concat/ui/phone/editor.slint b/src/crates/concat/ui/phone/editor.slint
new file mode 100644
index 00000000..05144d0c
--- /dev/null
+++ b/src/crates/concat/ui/phone/editor.slint
@@ -0,0 +1,1150 @@
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// SPDX-FileCopyrightText: 2026 Jareer and Concat contributors
+
+import { I18n } from "../i18n.slint";
+import { Theme } from "../theme/theme.slint";
+import { Fmt } from "../util.slint";
+import { Glyph, Icon } from "../icons.slint";
+import { Editor } from "../editor.slint";
+import { Lanes } from "../timeline/lanes.slint";
+import { ClipKind } from "../timeline/model.slint";
+import { PreviewPane } from "../workspace/preview-pane.slint";
+import { ContextMenu } from "../primitives/context-menu.slint";
+import {
+ CategoryPillBar, MediaCard, MediaItemData, PresetGrid, ShelfGrid, ShelfSearch,
+} from "../workspace/media-pane.slint";
+import {
+ AdjustPanel, AudioPanel, FilterPanel, Library, PresetStack, ProcessorRows, SpeedPanel,
+ VideoPanel,
+} from "../inspector/clip-inspector.slint";
+import { TextPanel } from "../inspector/text-panel.slint";
+import { RoundButton, ToolItem, ToolStrip } from "controls.slint";
+import { PhoneSheet } from "sheet.slint";
+
+// The editor as a phone shows it: one screen, held upright, driven by a
+// finger. Shown in place of the title strip and the dock wherever the
+// window is a phone's - see `App.phone` and `platform::phone` - and never
+// beside them: the desk's layout is the desk's, and this one is not a
+// squeezed copy of it but the shape every phone editor has arrived at,
+// because a thumb and a portrait screen leave no other.
+//
+// Top to bottom:
+//
+// - a bar with the way out, the project's name, Settings and Export;
+// - the monitor, which takes whatever height the rest leaves;
+// - the transport: where the playhead is, Play, undo and redo;
+// - the lanes, with the playhead held at their middle and the cut
+// sliding under it - a drag scrubs, a tap on a clip selects it, a
+// tap on empty lane lets go, a clip dragged moves (see `finger` in
+// lanes.slint, and `centred` in the timeline pane on the Rust side);
+// - the bar of tools. With nothing selected it is the library's pages
+// and the project's verbs; with a clip selected it is the clip's
+// verbs, with a way back at its head.
+//
+// Every tool that has more to say than a press opens a sheet over the
+// lanes and the bar (sheet.slint) holding the same panel the desk shows
+// for it - the inspector's page, the library's shelf - so the phone and
+// the desk edit through one set of controls and one set of callbacks.
+// Everything read and everything reported goes through the Editor global,
+// the way the seats do it; there is no phone-only state on the Rust side
+// beyond the two facts named above.
+
+/// A grid of the bin's cards for a finger: a tap on a card puts the file
+/// on the timeline at the playhead, which on a phone is the whole of what
+/// the bin is for - there is nowhere to drag a card to.
+component PhoneMediaGrid inherits Rectangle {
+ in property <[MediaItemData]> items;
+
+ callback picked(id: int);
+
+ property <length> gap: 8px;
+ property <length> min-card: 100px;
+ 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;
+ property <length> card-h: root.card-w * 9 / 16 + 4px + 14px;
+ property <int> rows: Math.ceil(root.items.length / root.cols);
+
+ height: root.rows > 0 ? root.rows * (root.card-h + root.gap) - root.gap : 0px;
+
+ for entry[index] in root.items: MediaCard {
+ x: Math.mod(index, root.cols) * (root.card-w + root.gap);
+ y: Math.floor(index / root.cols) * (root.card-h + root.gap);
+ width: root.card-w;
+ height: root.card-h;
+ item: entry;
+ removable: false;
+
+ clicked(additive) => { root.picked(entry.id); }
+ activated => { root.picked(entry.id); }
+ }
+}
+
+/// A worded button the width of its sheet: Import, Add a title, Modify.
+component SheetButton inherits Rectangle {
+ in property <string> label;
+ in property <Glyph> glyph;
+ in property <bool> primary;
+ in property <bool> enabled: true;
+
+ callback clicked();
+
+ height: 44px;
+ border-radius: Theme.r;
+ opacity: root.enabled ? 1.0 : 0.5;
+ background: root.primary
+ ? (touch.pressed ? Theme.accent-hover : Theme.accent)
+ : (touch.pressed ? Theme.field-active : Theme.field);
+
+ animate background { duration: 100ms; easing: cubic-bezier(0.4, 0, 0.2, 1); }
+
+ HorizontalLayout {
+ alignment: center;
+ spacing: 8px;
+ padding-left: 16px;
+ padding-right: 16px;
+
+ VerticalLayout {
+ alignment: center;
+ Icon {
+ glyph: root.glyph;
+ size: 16px;
+ tint: root.primary ? Theme.on-accent : Theme.fg;
+ }
+ }
+
+ Text {
+ text: root.label;
+ color: root.primary ? Theme.on-accent : Theme.fg;
+ font-size: Theme.fs-lg;
+ font-weight: Theme.weight-title;
+ vertical-alignment: center;
+ }
+ }
+
+ touch := TouchArea {
+ enabled: root.enabled;
+ clicked => { root.clicked(); }
+ }
+}
+
+/// A line of quiet words in a sheet: what a page is for, or why it is
+/// empty.
+component SheetNote inherits Text {
+ color: Theme.fg-dim;
+ font-size: Theme.fs;
+ wrap: word-wrap;
+}
+
+/// One of the project's facts: the label, then the value against the
+/// trailing edge.
+component Fact inherits HorizontalLayout {
+ in property <string> label;
+ in property <string> value;
+
+ spacing: 12px;
+ min-height: 30px;
+
+ Text {
+ text: root.label;
+ color: Theme.fg-muted;
+ font-size: Theme.fs;
+ vertical-alignment: center;
+ }
+
+ Text {
+ horizontal-stretch: 1;
+ text: root.value;
+ color: Theme.fg;
+ font-family: Theme.font-technical;
+ font-size: Theme.fs;
+ horizontal-alignment: right;
+ vertical-alignment: center;
+ wrap: word-wrap;
+ }
+}
+
+/// A round chip over the lanes: the zoom, since a finger cannot pinch
+/// here - Slint sees one finger at a time.
+component LaneChip inherits Rectangle {
+ in property <Glyph> glyph;
+ in property <string> label;
+
+ callback clicked();
+
+ width: 34px;
+ height: 34px;
+ border-radius: 17px;
+ background: touch.pressed ? Theme.field-active : Theme.raised;
+ border-width: 1px;
+ border-color: Theme.line-strong;
+
+ Icon {
+ x: (parent.width - self.width) / 2;
+ y: (parent.height - self.height) / 2;
+ glyph: root.glyph;
+ size: 14px;
+ tint: Theme.fg;
+ }
+
+ touch := TouchArea {
+ clicked => { root.clicked(); }
+ }
+}
+
+export component PhoneEditor inherits Rectangle {
+ in property <string> project-name;
+ /// "saved", "saving…": the little truth under the name.
+ in property <string> status;
+
+ callback export-clicked();
+ callback open-settings();
+ /// Back to the launch screen; the window saves on the way.
+ callback close-project();
+
+ /// Which sheet is up, by name, or empty for none. The names are the
+ /// library's pages - "media", "text", "effects", "filters",
+ /// "transitions" - the project's own, and a "clip-" page of the
+ /// inspector for the selected clip.
+ property <string> sheet;
+ /// The sheet up is one of the clip's, and goes with the clip.
+ property <bool> sheet-needs-clip;
+
+ property <bool> has-clip: Editor.selected-clip.present;
+ property <ClipKind> kind: Editor.selected-clip.kind;
+ property <bool> is-video: root.kind == ClipKind.video;
+ property <bool> is-audio: root.kind == ClipKind.audio;
+ property <bool> is-image: root.kind == ClipKind.image;
+ property <bool> is-text: root.kind == ClipKind.text;
+ property <bool> is-layer: root.kind == ClipKind.filter;
+ /// A picture: what has a placement, a colour and a chain of effects.
+ property <bool> is-picture: root.is-video || root.is-image;
+
+ // A clip's sheet closes with the clip - deleted, or let go of by a tap
+ // on the floor - rather than staying up over a selection it no longer
+ // describes.
+ changed has-clip => {
+ if (!root.has-clip && root.sheet-needs-clip) {
+ root.hide();
+ }
+ }
+
+ function show(name: string, needs-clip: bool) {
+ root.sheet = name;
+ root.sheet-needs-clip = needs-clip;
+ }
+ function hide() {
+ root.sheet = "";
+ root.sheet-needs-clip = false;
+ }
+
+ pure function sheet-title(name: string) -> string {
+ return name == "media" ? I18n.t("common.media")
+ : name == "text" || name == "clip-text" ? I18n.t("common.text")
+ : name == "effects" || name == "clip-effects" ? I18n.t("common.effects")
+ : name == "filters" ? I18n.t("mediaPane.filters")
+ : name == "transitions" ? I18n.t("mediaPane.transitions")
+ : name == "project" ? I18n.t("phone.project")
+ : name == "clip-video" ? I18n.t("phone.edit")
+ : name == "clip-speed" ? I18n.t("common.speed")
+ : name == "clip-audio" ? I18n.t("common.audio")
+ : name == "clip-adjust" ? I18n.t("common.adjust")
+ : name == "clip-layer" ? I18n.t("configPane.filter")
+ : "";
+ }
+
+ background: Theme.page;
+
+ // Placed rather than laid out. The lanes take a share of the screen's
+ // height, and a layout that read the height of the thing it is sizing
+ // is a binding loop - the launch screen has the same note. Five rows,
+ // each at a height of its own: the bar and the lanes are measured up
+ // from the foot, the top bar and the transport down from the head, and
+ // the monitor is what is left between.
+ property <length> top-h: 48px;
+ property <length> transport-h: 56px;
+ /// A third of the screen, and never less than a ruler and two lanes.
+ property <length> lanes-h: Math.max(170px, root.height * 0.3);
+ property <length> bar-h: 74px;
+ property <length> lanes-y: root.height - root.bar-h - root.lanes-h;
+ property <length> transport-y: root.lanes-y - root.transport-h;
+
+ // ── the top bar ──────────────────────────────────────────────────
+ Rectangle {
+ x: 0;
+ y: 0;
+ width: root.width;
+ height: root.top-h;
+
+ HorizontalLayout {
+ padding-left: 4px;
+ padding-right: 8px;
+ spacing: 2px;
+
+ VerticalLayout {
+ alignment: center;
+ RoundButton {
+ glyph: Glyph.close;
+ label: I18n.t("studio.closeProject");
+ clicked => { root.close-project(); }
+ }
+ }
+
+ VerticalLayout {
+ horizontal-stretch: 1;
+ alignment: center;
+ spacing: 1px;
+
+ Text {
+ text: root.project-name;
+ color: Theme.fg;
+ font-size: Theme.fs-lg;
+ font-weight: Theme.weight-title;
+ horizontal-alignment: center;
+ overflow: elide;
+ }
+ Text {
+ text: root.status;
+ color: Theme.fg-dim;
+ font-size: Theme.fs-xs;
+ horizontal-alignment: center;
+ }
+ }
+
+ VerticalLayout {
+ alignment: center;
+ RoundButton {
+ glyph: Glyph.settings;
+ label: I18n.t("common.settings");
+ clicked => { root.open-settings(); }
+ }
+ }
+
+ // The one filled control on the bar: what the edit is for.
+ VerticalLayout {
+ alignment: center;
+ padding-left: 4px;
+
+ Rectangle {
+ width: export-label.preferred-width + export-icon.width + 32px;
+ height: 36px;
+ border-radius: 18px;
+ background: export-touch.pressed ? Theme.accent-hover : Theme.accent;
+
+ animate background { duration: 100ms; easing: cubic-bezier(0.4, 0, 0.2, 1); }
+
+ HorizontalLayout {
+ alignment: center;
+ spacing: 6px;
+ VerticalLayout {
+ alignment: center;
+ export-icon := Icon {
+ glyph: Glyph.export;
+ size: 14px;
+ tint: Theme.on-accent;
+ }
+ }
+ export-label := Text {
+ text: I18n.t("common.export");
+ color: Theme.on-accent;
+ font-size: Theme.fs-lg;
+ font-weight: Theme.weight-title;
+ vertical-alignment: center;
+ }
+ }
+
+ export-touch := TouchArea {
+ clicked => { root.export-clicked(); }
+ }
+ }
+ }
+ }
+ }
+
+ // ── the monitor ──────────────────────────────────────────────────
+ //
+ // The pane's stage alone, with 8px of the ground either side so it
+ // reads as a card on the page like the lanes under it. The stage
+ // keeps its gestures: a drag moves the selected picture, a press
+ // on the well pans the view, a double tap fits it again.
+ Rectangle {
+ x: 0;
+ y: root.top-h;
+ width: root.width;
+ height: Math.max(0px, root.transport-y - root.top-h);
+
+ monitor := PreviewPane {
+ x: 8px;
+ y: 0;
+ width: parent.width - 16px;
+ height: parent.height;
+ bare: true;
+
+ output-width: Editor.output-width;
+ output-height: Editor.output-height;
+ frame-rate: Editor.frame-rate;
+ ratio-index: Editor.ratio-index;
+ quality-index: Editor.quality-index;
+ playhead: Editor.playhead;
+ duration: Editor.preview-duration;
+ playhead-free: Editor.playhead-free;
+ playing: Editor.playing;
+ has-picture: Editor.has-picture;
+ clip-name: Editor.preview-clip-name;
+ frame: Editor.preview-frame;
+ stage-items: Editor.stage-items;
+ stage-guides: Editor.stage-guides;
+ stroke-path: Editor.stroke-path;
+ stroke-width: Editor.stroke-width;
+ stroke-erase: Editor.stroke-erase;
+ painting: Editor.painting && Editor.selected-clip.cutout == 2;
+
+ play-toggled => { Editor.play-toggled(); }
+ seek(seconds) => { Editor.seek(seconds); }
+ step(frames) => { Editor.step-frames(frames); }
+ ratio-changed(index) => { Editor.ratio-changed(index); }
+ quality-changed(index) => { Editor.quality-changed(index); }
+ stage-pressed(x, y, additive) => {
+ Editor.blur();
+ Editor.stage-pressed(x, y, additive);
+ }
+ stage-grip-pressed(id, grip, x, y) => {
+ Editor.blur();
+ Editor.stage-grip-pressed(id, grip, x, y);
+ }
+ stage-dragged(x, y, snap) => { Editor.stage-dragged(x, y, snap); }
+ stage-released => { Editor.stage-released(); }
+ }
+ }
+
+ // ── the transport ────────────────────────────────────────────────
+ //
+ // Where the playhead is on the leading edge, the view's way back
+ // and the history's two steps on the trailing one, and Play in the
+ // middle of the row - placed against the whole row rather than laid
+ // out, so it stays under the thumb whatever the timecode's width.
+ Rectangle {
+ x: 0;
+ y: root.transport-y;
+ width: root.width;
+ height: root.transport-h;
+
+ HorizontalLayout {
+ padding-left: 16px;
+ padding-right: 8px;
+ spacing: 2px;
+
+ Text {
+ horizontal-stretch: 1;
+ text: Fmt.short-duration(Editor.playhead)
+ + " / " + Fmt.short-duration(Editor.preview-duration);
+ color: Theme.fg;
+ font-family: Theme.font-technical;
+ font-size: Theme.fs-lg;
+ vertical-alignment: center;
+ }
+
+ VerticalLayout {
+ alignment: center;
+ RoundButton {
+ glyph: Glyph.fit;
+ label: I18n.t("previewPane.fitFramePane");
+ size: 40px;
+ icon-size: 16px;
+ clicked => { monitor.fit-view(); }
+ }
+ }
+ VerticalLayout {
+ alignment: center;
+ RoundButton {
+ glyph: Glyph.undo;
+ label: I18n.t("phone.undo");
+ enabled: Editor.can-undo;
+ size: 40px;
+ icon-size: 17px;
+ clicked => { Editor.undo(); }
+ }
+ }
+ VerticalLayout {
+ alignment: center;
+ RoundButton {
+ glyph: Glyph.redo;
+ label: I18n.t("phone.redo");
+ enabled: Editor.can-redo;
+ size: 40px;
+ icon-size: 17px;
+ clicked => { Editor.redo(); }
+ }
+ }
+ }
+
+ RoundButton {
+ x: (parent.width - self.width) / 2;
+ y: (parent.height - self.height) / 2;
+ size: 46px;
+ icon-size: 20px;
+ accent: true;
+ glyph: Editor.playing ? Glyph.pause : Glyph.play;
+ label: Editor.playing ? I18n.t("previewPane.pause") : I18n.t("previewPane.play");
+ clicked => { Editor.play-toggled(); }
+ }
+ }
+
+ // ── the lanes ────────────────────────────────────────────────────
+ //
+ // No lane headers: a lane is untyped and its switches are the desk's
+ // business; the clips are the whole of what a thumb needs here.
+ stack := Rectangle {
+ x: 0;
+ y: root.lanes-y;
+ width: root.width;
+ height: root.lanes-h;
+
+ // The stack scrolls here rather than in Rust, as it does in the
+ // timeline pane and for the same reason: it is a property of
+ // looking at the lanes, not of the edit. Clamped on read, so a
+ // stack that gets shorter cannot leave the view parked past its
+ // end.
+ property <length> track-scroll;
+ property <length> stack-h: Editor.tracks.length > 0
+ ? Editor.tracks[Editor.tracks.length - 1].top
+ + Editor.tracks[Editor.tracks.length - 1].height
+ : 0px;
+ property <length> overflow: Math.max(0px,
+ self.stack-h - Math.max(0px, lanes.height - lanes.ruler-height));
+ property <length> at: Math.max(0px, Math.min(self.overflow, self.track-scroll));
+
+ Rectangle {
+ x: 8px;
+ y: 0;
+ width: parent.width - 16px;
+ height: parent.height;
+ background: Theme.panel;
+ border-radius: Theme.r-lg;
+ clip: true;
+
+ lanes := Lanes {
+ x: 0;
+ y: 0;
+ width: parent.width;
+ height: parent.height;
+
+ finger: true;
+ edge-grab: 14px;
+ ruler-height: 24px;
+ track-scroll: stack.at;
+
+ tracks: Editor.tracks;
+ clips: Editor.clips;
+ key-marks: Editor.key-marks;
+ tool: Editor.tool;
+ playhead: Editor.playhead;
+ frame-rate: Editor.frame-rate;
+ scroll-left: Editor.scroll-left;
+ seconds-per-pixel: Editor.seconds-per-pixel;
+ pan-mode: false;
+ preview-axis: false;
+ drop: Editor.drop;
+ menu-items: Editor.menu-items;
+ menu-height: Editor.menu-height;
+ menu-token: Editor.menu-token;
+
+ scrubbed(seconds) => {
+ Editor.blur();
+ Editor.scrubbed(seconds);
+ }
+ key-mark-moved(from, to) => { Editor.key-mark-moved(from, to); }
+ hovered(seconds) => { Editor.hovered(seconds); }
+ hover-ended => { Editor.hover-ended(); }
+ floor-pressed => { Editor.blur(); }
+ clip-pressed(id, additive, edge) => {
+ Editor.blur();
+ Editor.clip-pressed(id, additive, edge);
+ }
+ clip-dragged(seconds, pixels) => { Editor.clip-dragged(seconds, pixels); }
+ clip-released => { Editor.clip-released(); }
+ clip-context(id) => { Editor.clip-context(id); }
+ menu-selected(id) => { Editor.menu-selected(id); }
+ band-selected(a, b, c, d, additive) => {
+ Editor.band-selected(a, b, c, d, additive);
+ }
+ scrolled(seconds) => { Editor.scrolled(seconds); }
+ track-scrolled(pixels) => {
+ stack.track-scroll = Math.max(0px,
+ Math.min(stack.overflow, stack.at + pixels));
+ }
+ zoomed(factor, anchor) => { Editor.zoom(factor, anchor); }
+ drag-hovered(payload, seconds, row) => {
+ Editor.drag-hovered(payload, seconds, row);
+ }
+ dropped(payload, seconds, row) => { Editor.dropped(payload, seconds, row); }
+ // How wide the lanes are decides which clips Rust sends,
+ // and where their middle is.
+ changed width => { Editor.lanes-resized(self.width / 1px); }
+ init => { Editor.lanes-resized(self.width / 1px); }
+ }
+
+ // An empty cut says where to start. Takes no presses, so the
+ // lanes under it still do.
+ if Editor.clips.length == 0: Text {
+ x: 16px;
+ y: lanes.ruler-height + 14px;
+ width: parent.width - 32px;
+ text: I18n.t("phone.emptyLanes");
+ color: Theme.fg-dim;
+ font-size: Theme.fs;
+ horizontal-alignment: center;
+ wrap: word-wrap;
+ }
+
+ // The zoom, about the playhead - which is the middle, so the
+ // cut grows and shrinks around what is under it.
+ HorizontalLayout {
+ x: parent.width - self.preferred-width - 8px;
+ y: parent.height - 34px - 8px;
+ width: self.preferred-width;
+ height: 34px;
+ spacing: 6px;
+
+ LaneChip {
+ glyph: Glyph.minus;
+ label: I18n.t("common.zoomOut");
+ clicked => { Editor.zoom(1.4, Editor.playhead); }
+ }
+ LaneChip {
+ glyph: Glyph.plus;
+ label: I18n.t("common.zoomIn");
+ clicked => { Editor.zoom(1 / 1.4, Editor.playhead); }
+ }
+ }
+ }
+ }
+
+ // ── the bar ──────────────────────────────────────────────────────
+ Rectangle {
+ x: 0;
+ y: root.height - root.bar-h;
+ width: root.width;
+ height: root.bar-h;
+
+ Rectangle {
+ x: 0;
+ y: 0;
+ width: parent.width;
+ height: 1px;
+ background: Theme.line;
+ }
+
+ // Nothing selected: what can be brought into the cut, and the
+ // project's own verbs.
+ if !root.has-clip: ToolStrip {
+ x: 0;
+ y: 1px;
+ width: parent.width;
+ height: parent.height - 1px;
+
+ ToolItem {
+ glyph: Glyph.film;
+ label: I18n.t("common.media");
+ current: root.sheet == "media";
+ clicked => { root.show("media", false); }
+ }
+ ToolItem {
+ glyph: Glyph.text-mark;
+ label: I18n.t("common.text");
+ current: root.sheet == "text";
+ clicked => { root.show("text", false); }
+ }
+ ToolItem {
+ glyph: Glyph.sparkle;
+ label: I18n.t("common.effects");
+ current: root.sheet == "effects";
+ clicked => { root.show("effects", false); }
+ }
+ ToolItem {
+ glyph: Glyph.filter;
+ label: I18n.t("mediaPane.filters");
+ current: root.sheet == "filters";
+ clicked => { root.show("filters", false); }
+ }
+ ToolItem {
+ glyph: Glyph.transition;
+ label: I18n.t("mediaPane.transitions");
+ current: root.sheet == "transitions";
+ clicked => { root.show("transitions", false); }
+ }
+ ToolItem {
+ glyph: Glyph.waveform;
+ label: I18n.t("phone.captions");
+ clicked => { Editor.captions(); }
+ }
+ ToolItem {
+ glyph: Glyph.volume;
+ label: I18n.t("phone.speak");
+ clicked => { Editor.speak(); }
+ }
+ ToolItem {
+ glyph: Glyph.info;
+ label: I18n.t("phone.project");
+ current: root.sheet == "project";
+ clicked => { root.show("project", false); }
+ }
+ }
+
+ // A clip selected: its verbs, in the order they are reached for,
+ // with the way back at the head. Which appear depends on what
+ // the clip is - a still has no speed, a sound no picture, a
+ // title only its words and its effects - the same rule the
+ // inspector's tabs follow.
+ if root.has-clip: ToolStrip {
+ x: 0;
+ y: 1px;
+ width: parent.width;
+ height: parent.height - 1px;
+
+ ToolItem {
+ glyph: Glyph.chevron-left;
+ label: I18n.t("phone.back");
+ clicked => {
+ root.hide();
+ Editor.shortcut("deselect");
+ }
+ }
+ ToolItem {
+ glyph: Glyph.split;
+ label: I18n.t("phone.split");
+ clicked => { Editor.shortcut("split-selected"); }
+ }
+ ToolItem {
+ glyph: Glyph.trash;
+ label: I18n.t("common.delete");
+ clicked => { Editor.delete-selected(); }
+ }
+ if root.is-picture: ToolItem {
+ glyph: Glyph.fit;
+ label: I18n.t("phone.edit");
+ current: root.sheet == "clip-video";
+ clicked => { root.show("clip-video", true); }
+ }
+ if root.is-text: ToolItem {
+ glyph: Glyph.text-mark;
+ label: I18n.t("common.text");
+ current: root.sheet == "clip-text";
+ clicked => { root.show("clip-text", true); }
+ }
+ if root.is-layer: ToolItem {
+ glyph: Glyph.filter;
+ label: I18n.t("configPane.filter");
+ current: root.sheet == "clip-layer";
+ clicked => { root.show("clip-layer", true); }
+ }
+ if root.is-video || root.is-audio: ToolItem {
+ glyph: Glyph.clock;
+ label: I18n.t("common.speed");
+ current: root.sheet == "clip-speed";
+ clicked => { root.show("clip-speed", true); }
+ }
+ if root.is-video || root.is-audio: ToolItem {
+ glyph: Glyph.volume;
+ label: I18n.t("common.audio");
+ current: root.sheet == "clip-audio";
+ clicked => { root.show("clip-audio", true); }
+ }
+ if root.is-picture: ToolItem {
+ glyph: Glyph.sun;
+ label: I18n.t("common.adjust");
+ current: root.sheet == "clip-adjust";
+ clicked => { root.show("clip-adjust", true); }
+ }
+ if root.is-picture || root.is-text: ToolItem {
+ glyph: Glyph.sparkle;
+ label: I18n.t("common.effects");
+ current: root.sheet == "clip-effects";
+ clicked => { root.show("clip-effects", true); }
+ }
+ if root.is-picture: ToolItem {
+ glyph: Glyph.transition;
+ label: I18n.t("mediaPane.transitions");
+ current: root.sheet == "transitions";
+ clicked => { root.show("transitions", true); }
+ }
+ ToolItem {
+ glyph: Glyph.copy;
+ label: I18n.t("phone.duplicate");
+ clicked => { Editor.shortcut("duplicate"); }
+ }
+ if root.is-picture: ToolItem {
+ glyph: Glyph.frame;
+ label: I18n.t("timelinePane.freeze");
+ enabled: Editor.freezable;
+ clicked => { Editor.shortcut("freeze"); }
+ }
+ if root.is-video || root.is-audio: ToolItem {
+ glyph: Glyph.reverse;
+ label: I18n.t("common.reverse");
+ enabled: Editor.reversible;
+ clicked => { Editor.shortcut("reverse"); }
+ }
+ if root.is-picture: ToolItem {
+ glyph: Glyph.flip-h;
+ label: I18n.t("timelinePane.mirror");
+ enabled: Editor.picture-selected;
+ clicked => { Editor.shortcut("mirror"); }
+ }
+ if root.is-picture: ToolItem {
+ glyph: Glyph.rotate;
+ label: I18n.t("timelinePane.rotate");
+ enabled: Editor.picture-selected;
+ clicked => { Editor.shortcut("rotate"); }
+ }
+ if Editor.sound-selected: ToolItem {
+ glyph: Glyph.waveform;
+ label: I18n.t("phone.captions");
+ clicked => { Editor.captions(); }
+ }
+ if Editor.title-selected: ToolItem {
+ glyph: Glyph.volume;
+ label: I18n.t("phone.speak");
+ clicked => { Editor.speak(); }
+ }
+ // The rest of the clip's menu - copy, paste, its sound taken
+ // off its picture - as the menu itself, hung over the bar.
+ ToolItem {
+ glyph: Glyph.chevron-up;
+ label: I18n.t("phone.more");
+ clicked => {
+ more-menu.request-x = self.absolute-position.x - root.absolute-position.x;
+ more-menu.request-y = root.height - 74px;
+ Editor.clip-context(Editor.selected-clip.id);
+ }
+ }
+ }
+ }
+
+ // ── the sheet ────────────────────────────────────────────────────────
+ //
+ // One sheet, one body, chosen by name. Each page is the desk's own
+ // panel bound to the Editor global the way the seats bind it; the
+ // library's pages close themselves once something is placed, so what
+ // was placed is seen, and the inspector's stay up to be worked in.
+ PhoneSheet {
+ x: 0;
+ y: 0;
+ width: root.width;
+ height: root.height;
+ open: root.sheet != "";
+ title: root.sheet-title(root.sheet);
+ closed => { root.hide(); }
+
+ // ── the bin ──
+ if root.sheet == "media": VerticalLayout {
+ padding: 12px;
+ spacing: 12px;
+
+ SheetButton {
+ glyph: Glyph.import;
+ primary: true;
+ enabled: !Editor.importing;
+ label: Editor.importing ? I18n.t("mediaPane.importing") : I18n.t("phone.importMedia");
+ clicked => { Editor.import-media(); }
+ }
+ SheetNote {
+ text: Editor.media.length == 0
+ ? I18n.t("phone.noMediaYet") : I18n.t("phone.tapToAdd");
+ }
+ PhoneMediaGrid {
+ items: Editor.media;
+ picked(id) => {
+ Editor.media-activate(id);
+ root.hide();
+ }
+ }
+ }
+
+ // ── titles ──
+ if root.sheet == "text": VerticalLayout {
+ padding: 12px;
+ spacing: 12px;
+
+ SheetButton {
+ glyph: Glyph.plus;
+ primary: true;
+ label: I18n.t("phone.addATitle");
+ clicked => {
+ Editor.library-add-text("default");
+ root.hide();
+ }
+ }
+ SheetNote { text: I18n.t("phone.looks"); }
+ PresetGrid {
+ items: Editor.text-presets;
+ applied(id) => {
+ Editor.library-add-text(id);
+ root.hide();
+ }
+ }
+ }
+
+ // ── effects, with nothing selected ──
+ if root.sheet == "effects": VerticalLayout {
+ padding: 12px;
+ spacing: 8px;
+
+ if !root.has-clip: SheetNote { text: I18n.t("phone.selectClipFirst"); }
+ ShelfSearch {
+ shelf: 1;
+ placeholder: I18n.t1("common.searchKind", I18n.t("common.effect"));
+ }
+ CategoryPillBar {
+ current: Library.view(1).category;
+ picked(cat) => { Library.category-changed(1, cat); }
+ }
+ ShelfGrid {
+ entries: Editor.catalogue-effects;
+ glyph: Glyph.sparkle;
+ auditions: false;
+ applied(id, label) => { Editor.library-apply-effect(id); }
+ }
+ }
+
+ // ── the selected clip's effects: its chain, then the shelf ──
+ if root.sheet == "clip-effects": VerticalLayout {
+ spacing: 0px;
+
+ PresetStack {
+ noun: I18n.t("common.effect");
+ library-title: I18n.t("common.effects");
+ library: false;
+ empty-note: I18n.t("phone.noEffectYet");
+ shelf: 1;
+ group-labels: Editor.effect-groups;
+ catalogue: Editor.catalogue-effects;
+ applied: Editor.applied-visual;
+ params: Editor.visual-params;
+ wheel-groups: Editor.visual-wheels;
+ curve-groups: Editor.visual-curves;
+ colours: Editor.visual-colours;
+
+ add(id) => { Editor.chain-add(false, id); }
+ toggle(index) => { Editor.chain-toggle(false, index); }
+ move-by(index, delta) => { Editor.chain-move-by(false, index, delta); }
+ remove(index) => { Editor.chain-remove(false, index); }
+ set-param(index, key, value) => {
+ Editor.chain-set-param(false, index, key, value);
+ }
+ set-colour(index, key, value) => {
+ Editor.chain-set-colour(index, key, value);
+ }
+ curve-point(index, key, point, x, y) => {
+ Editor.curve-point(index, key, point, x, y);
+ }
+ curve-remove(index, key, point) => {
+ Editor.curve-remove(index, key, point);
+ }
+ commit => { Editor.clip-commit(); }
+ }
+
+ Rectangle {
+ height: 1px;
+ background: Theme.line;
+ }
+
+ VerticalLayout {
+ padding: 12px;
+ spacing: 8px;
+
+ ShelfSearch {
+ shelf: 1;
+ placeholder: I18n.t1("common.searchKind", I18n.t("common.effect"));
+ }
+ CategoryPillBar {
+ current: Library.view(1).category;
+ picked(cat) => { Library.category-changed(1, cat); }
+ }
+ ShelfGrid {
+ entries: Editor.catalogue-effects;
+ glyph: Glyph.sparkle;
+ auditions: false;
+ applied(id, label) => { Editor.library-apply-effect(id); }
+ }
+ }
+ }
+
+ // ── filters: a look laid over the cut at the playhead ──
+ if root.sheet == "filters": VerticalLayout {
+ padding: 12px;
+ spacing: 8px;
+
+ ShelfSearch {
+ shelf: 0;
+ placeholder: I18n.t1("common.searchKind", I18n.t("mediaPane.filter"));
+ }
+ ShelfGrid {
+ entries: Editor.catalogue-filters;
+ auditions: false;
+ applied(id, label) => {
+ Editor.library-apply-filter(id, label);
+ root.hide();
+ }
+ }
+ }
+
+ // ── transitions: onto the cut into the selected clip ──
+ if root.sheet == "transitions": VerticalLayout {
+ padding: 12px;
+ spacing: 8px;
+
+ if !root.has-clip: SheetNote { text: I18n.t("phone.selectClipFirst"); }
+ ShelfSearch {
+ shelf: 3;
+ placeholder: I18n.t1("common.searchKind", I18n.t("mediaPane.transition"));
+ }
+ ShelfGrid {
+ entries: Editor.catalogue-transitions;
+ glyph: Glyph.transition;
+ auditions: false;
+ applied(id, label) => { Editor.library-apply-transition(id); }
+ }
+ }
+
+ // ── the inspector's pages ──
+ if root.sheet == "clip-video": VideoPanel {
+ selected: Editor.selected-clip;
+ applied: Editor.applied-visual;
+ params: Editor.visual-params;
+ colours: Editor.visual-colours;
+ brush-tool: Editor.brush-tool;
+ brush-size: Editor.brush-size;
+ painting: Editor.painting;
+ set(field, value) => { Editor.clip-set(field, value); }
+ commit => { Editor.clip-commit(); }
+ chain-add(id) => { Editor.chain-add(false, id); }
+ chain-remove(index) => { Editor.chain-remove(false, index); }
+ chain-set-param(index, key, value) => {
+ Editor.chain-set-param(false, index, key, value);
+ }
+ chain-set-colour(index, key, value) => {
+ Editor.chain-set-colour(index, key, value);
+ }
+ cutout-mode(mode) => { Editor.cutout-mode(mode); }
+ cutout-tool(index) => { Editor.cutout-tool(index); }
+ cutout-size(size) => { Editor.cutout-size(size); }
+ cutout-painting(on) => { Editor.cutout-painting(on); }
+ cutout-subject(index) => { Editor.cutout-subject(index); }
+ cutout-clear => { Editor.cutout-clear(); }
+ transition-remove => { Editor.transition-remove(); }
+ transition-duration-set(seconds) => { Editor.transition-duration-set(seconds); }
+ }
+
+ if root.sheet == "clip-speed": SpeedPanel {
+ selected: Editor.selected-clip;
+ set(field, value) => { Editor.clip-set(field, value); }
+ commit => { Editor.clip-commit(); }
+ }
+
+ if root.sheet == "clip-audio": VerticalLayout {
+ AudioPanel {
+ selected: Editor.selected-clip;
+ audio-tracks: Editor.audio-tracks;
+ set(field, value) => { Editor.clip-set(field, value); }
+ commit => { Editor.clip-commit(); }
+ }
+ ProcessorRows {
+ applied: Editor.applied-audio;
+ params: Editor.audio-params;
+ add(id) => { Editor.chain-add(true, id); }
+ remove(index) => { Editor.chain-remove(true, index); }
+ set-param(index, key, value) => {
+ Editor.chain-set-param(true, index, key, value);
+ }
+ commit => { Editor.clip-commit(); }
+ }
+ PresetStack {
+ noun: I18n.t("common.audioEffect");
+ library-title: I18n.t("configPane.audioEffects");
+ shelf: 2;
+ hidden: ["concat.loudness", "concat.denoise", "concat.enhance-voice"];
+ group-labels: Editor.audio-groups;
+ catalogue: Editor.catalogue-audio;
+ applied: Editor.applied-audio;
+ params: Editor.audio-params;
+
+ add(id) => { Editor.chain-add(true, id); }
+ toggle(index) => { Editor.chain-toggle(true, index); }
+ move-by(index, delta) => { Editor.chain-move-by(true, index, delta); }
+ remove(index) => { Editor.chain-remove(true, index); }
+ set-param(index, key, value) => {
+ Editor.chain-set-param(true, index, key, value);
+ }
+ commit => { Editor.clip-commit(); }
+ }
+ }
+
+ if root.sheet == "clip-adjust": AdjustPanel {
+ params: Editor.adjust-params;
+ wheels: Editor.adjust-wheels;
+ curves: Editor.adjust-curves;
+ set(key, value) => { Editor.adjust-set(key, value); }
+ curve-point(key, point, x, y) => { Editor.curve-point(-1, key, point, x, y); }
+ curve-remove(key, point) => { Editor.curve-remove(-1, key, point); }
+ commit => { Editor.clip-commit(); }
+ }
+
+ if root.sheet == "clip-text": TextPanel {
+ selected: Editor.selected-clip;
+ set(field, value) => { Editor.clip-set(field, value); }
+ set-text(field, value) => { Editor.clip-set-text(field, value); }
+ set-colour(field, value) => { Editor.clip-set-colour(field, value); }
+ commit => { Editor.clip-commit(); }
+ }
+
+ if root.sheet == "clip-layer": FilterPanel {
+ selected: Editor.selected-clip;
+ set(field, value) => { Editor.clip-set(field, value); }
+ commit => { Editor.clip-commit(); }
+ }
+
+ // ── the project's facts, and the sheet that changes them ──
+ if root.sheet == "project": VerticalLayout {
+ padding: 16px;
+ spacing: 0px;
+
+ Fact { label: I18n.t("common.name"); value: Editor.project-name; }
+ Fact { label: I18n.t("configPane.folder"); value: Editor.project-folder; }
+ Fact { label: I18n.t("configPane.timeline"); value: Editor.timeline-name; }
+ Fact { label: I18n.t("common.frame"); value: Editor.project-output; }
+ Fact { label: I18n.t("common.rate"); value: Editor.project-rate; }
+ Fact { label: I18n.t("common.duration"); value: Editor.project-duration; }
+ Fact { label: I18n.t("common.media"); value: "\{Editor.count-media}"; }
+ Fact { label: I18n.t("configPane.tracks"); value: "\{Editor.count-tracks}"; }
+ Fact { label: I18n.t("configPane.clips"); value: "\{Editor.count-clips}"; }
+
+ Rectangle { height: 16px; }
+
+ SheetButton {
+ glyph: Glyph.settings;
+ label: I18n.t("configPane.modify");
+ clicked => {
+ root.hide();
+ Editor.modify-project();
+ }
+ }
+ }
+ }
+
+ // ── the clip's menu ──────────────────────────────────────────────────
+ //
+ // Over everything, so it can hang above the bar. Opened by the token
+ // Rust bumps once it has filled the rows; the lanes' own copy of this
+ // menu stays shut, since it opens only for a request it made itself.
+ more-menu := ContextMenu {
+ x: 0;
+ y: 0;
+ width: root.width;
+ height: root.height;
+ items: Editor.menu-items;
+ menu-height: Editor.menu-height;
+ token: Editor.menu-token;
+ selected(id) => { Editor.menu-selected(id); }
+ }
+}
diff --git a/src/crates/concat/ui/phone/sheet.slint b/src/crates/concat/ui/phone/sheet.slint
new file mode 100644
index 00000000..dfd9d866
--- /dev/null
+++ b/src/crates/concat/ui/phone/sheet.slint
@@ -0,0 +1,126 @@
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// SPDX-FileCopyrightText: 2026 Jareer and Concat contributors
+
+import { Theme } from "../theme/theme.slint";
+import { Glyph, Icon } from "../icons.slint";
+import { PhoneScroll } from "controls.slint";
+
+// The sheet: where the phone shows a panel.
+//
+// A desk has room for the library, the inspector and the timeline at once.
+// A phone held upright has room for the picture and the lanes, and every
+// panel is a sheet that rises from the foot of the screen over the lanes
+// and the bar, leaving the monitor in view - so a knob turned in the sheet
+// is seen in the picture above it. One sheet at a time; the tick in its
+// corner closes it, and so does a tap on what is left of the screen above.
+//
+// The panels inside are the panes' own - the inspector's pages, the
+// library's shelves, the bin's cards - on a column that scrolls under a
+// finger. See ui/phone/editor.slint for what goes in one.
+export component PhoneSheet inherits Rectangle {
+ in property <bool> open;
+ in property <string> title;
+ /// How much of the screen the sheet takes: enough for a panel, with
+ /// the monitor still in view above it.
+ in property <length> sheet-height: root.height * 0.6;
+
+ callback closed();
+
+ visible: root.open;
+ background: transparent;
+
+ // What is left above the sheet. A tap there is a dismissal; declared
+ // first, so the surface takes its own presses.
+ TouchArea {
+ clicked => { root.closed(); }
+ }
+
+ surface := Rectangle {
+ x: 0;
+ y: root.height - self.height;
+ width: root.width;
+ height: root.sheet-height;
+ background: Theme.panel;
+ border-top-left-radius: Theme.r-xl;
+ border-top-right-radius: Theme.r-xl;
+ border-width: 1px;
+ border-color: Theme.line-strong;
+ clip: true;
+
+ // Swallows presses that land on the sheet, so they do not reach the
+ // dismissal underneath.
+ TouchArea { }
+
+ VerticalLayout {
+ // ── the header ────────────────────────────────────────────────
+ Rectangle {
+ height: 50px;
+
+ Rectangle {
+ x: 0;
+ y: parent.height - 1px;
+ width: parent.width;
+ height: 1px;
+ background: Theme.line;
+ }
+
+ // The grab bar every phone sheet wears at its top edge. It
+ // says "this slides"; the tap above it is what slides it.
+ Rectangle {
+ x: (parent.width - self.width) / 2;
+ y: 6px;
+ width: 36px;
+ height: 4px;
+ border-radius: 2px;
+ background: Theme.line-strong;
+ }
+
+ HorizontalLayout {
+ padding-left: 16px;
+ padding-right: 6px;
+ padding-top: 8px;
+ spacing: 8px;
+
+ Text {
+ horizontal-stretch: 1;
+ text: root.title;
+ color: Theme.fg;
+ font-size: Theme.fs-xl;
+ font-weight: Theme.weight-title;
+ vertical-alignment: center;
+ overflow: elide;
+ }
+
+ VerticalLayout {
+ alignment: center;
+ Rectangle {
+ width: 44px;
+ height: 40px;
+ border-radius: Theme.r;
+ background: done.pressed ? Theme.field-active : Colors.transparent;
+
+ Icon {
+ x: (parent.width - self.width) / 2;
+ y: (parent.height - self.height) / 2;
+ glyph: Glyph.check;
+ size: 18px;
+ weight: 2.2;
+ tint: Theme.accent;
+ }
+
+ done := TouchArea {
+ clicked => { root.closed(); }
+ }
+ }
+ }
+ }
+ }
+
+ // ── the body ──────────────────────────────────────────────────
+ PhoneScroll {
+ vertical-stretch: 1;
+ @children
+ }
+ }
+ }
+}
diff --git a/src/crates/concat/ui/primitives/modal.slint b/src/crates/concat/ui/primitives/modal.slint
index f01f5c5d..cad307e8 100644
--- a/src/crates/concat/ui/primitives/modal.slint
+++ b/src/crates/concat/ui/primitives/modal.slint
@@ -49,8 +49,14 @@ export component Modal inherits Rectangle {
surface := Rectangle {
x: (parent.width - self.width) / 2;
y: (parent.height - self.height) / 2;
- width: root.surface-width;
- height: root.surface-height > 0px ? root.surface-height : body.preferred-height;
+ // Never wider or taller than the window less a margin: a phone held
+ // upright is narrower than any sheet's width, and a sheet that runs
+ // off both edges cannot be read or dismissed. On a desk the window's
+ // minimum is past every sheet's size, so this decides nothing there.
+ width: Math.min(root.surface-width, root.width - 24px);
+ height: Math.min(
+ root.surface-height > 0px ? root.surface-height : body.preferred-height,
+ root.height - 24px);
background: Theme.panel;
border-width: 1px;
border-color: Theme.line-strong;
diff --git a/src/crates/concat/ui/timeline/lanes.slint b/src/crates/concat/ui/timeline/lanes.slint
index 75fd0197..2bc4dbae 100644
--- a/src/crates/concat/ui/timeline/lanes.slint
+++ b/src/crates/concat/ui/timeline/lanes.slint
@@ -910,6 +910,18 @@ export component Lanes inherits Rectangle {
in property <float> seconds-per-pixel: 0.05;
in property <length> track-scroll;
in property <length> ruler-height: 28px;
+ /// How close to a clip's edge counts as taking hold of it. A pointer
+ /// finds six pixels; a finger wants more.
+ in property <length> edge-grab: 6px;
+ /// The lanes are driven by a finger: a phone. The floor and the ruler
+ /// are then one surface for one gesture - a drag along the cut scrubs,
+ /// the lanes sliding under a playhead Rust holds at their middle, and a
+ /// drag down the stack scrolls it - and a tap on an empty lane clears
+ /// the selection, as an empty band does. No band is drawn: there is no
+ /// modifier to add with and no pointer to aim a marquee by. Off, the
+ /// floor draws a band and the ruler scrubs where it is pressed, as on
+ /// a desk.
+ in property <bool> finger: false;
callback scrubbed(seconds: float);
/// A ruler diamond dragged from one instant to another.
@@ -1001,6 +1013,48 @@ export component Lanes inherits Rectangle {
pure function at(seconds: float) -> length {
return (seconds - root.scroll-left) * root.px-per-second;
}
+ // ── a finger on the lanes ─────────────────────────────────────────
+ //
+ // Which way a press went is decided once it has travelled far enough to
+ // say, and then held: a drag that wanders a little does not change jobs
+ // halfway. 0 is undecided - a tap, if it lets go like that - 1 is along
+ // the cut, 2 is down the stack.
+ property <int> finger-axis;
+ /// The playhead when the finger landed: what the drag is measured from,
+ /// so a view that has moved since does not double the distance.
+ property <float> finger-playhead;
+ property <length> finger-x;
+ property <length> finger-y;
+ property <length> finger-last-y;
+
+ function finger-down(x: length, y: length) {
+ root.finger-axis = 0;
+ root.finger-playhead = root.playhead;
+ root.finger-x = x;
+ root.finger-y = y;
+ root.finger-last-y = y;
+ }
+ /// The finger is at (`x`, `y`) now. `down-too` allows the vertical
+ /// job: the floor scrolls the stack, the ruler does not.
+ function finger-moved(x: length, y: length, down-too: bool) {
+ if (root.finger-axis == 0) {
+ if (Math.abs(x - root.finger-x) > 6px) {
+ root.finger-axis = 1;
+ } else if (down-too && Math.abs(y - root.finger-y) > 6px) {
+ root.finger-axis = 2;
+ }
+ }
+ if (root.finger-axis == 1) {
+ // The cut follows the finger: dragging it right brings earlier
+ // material under the playhead.
+ root.scrubbed(Math.max(0,
+ root.finger-playhead - (x - root.finger-x) / root.px-per-second));
+ } else if (root.finger-axis == 2) {
+ root.track-scrolled(root.finger-last-y - y);
+ root.finger-last-y = y;
+ }
+ }
+
// ── scrolling at the edge ─────────────────────────────────────────
// A scrub or a clip drag that reaches the lanes' edge scrolls the view
// that way, a dozen pixels a tick, and re-reports the pointer so the
@@ -1138,7 +1192,10 @@ export component Lanes inherits Rectangle {
width: 1px;
height: root.lanes-h;
background: Theme.grid;
- visible: root.tick > 0 && self.x >= 0px && self.x < parent.width;
+ // Nothing before the start of the cut: a centred view begins
+ // half a screen before it, and that half is empty ground.
+ visible: root.tick > 0 && self.seconds >= 0
+ && self.x >= 0px && self.x < parent.width;
}
// Declared before the clips, so each clip takes its own press and what
@@ -1164,7 +1221,11 @@ export component Lanes inherits Rectangle {
self.from-y = self.mouse-y;
self.to-x = self.mouse-x;
self.to-y = self.mouse-y;
- self.drawing = true;
+ if (root.finger) {
+ root.finger-down(self.mouse-x, self.mouse-y);
+ } else {
+ self.drawing = true;
+ }
} else if (event.kind == PointerEventKind.up
|| event.kind == PointerEventKind.cancel) {
if (self.drawing) {
@@ -1175,6 +1236,15 @@ export component Lanes inherits Rectangle {
root.stack-y(Math.min(self.from-y, self.to-y)),
root.stack-y(Math.max(self.from-y, self.to-y)),
self.additive);
+ } else if (root.finger && root.finger-axis == 0
+ && event.kind == PointerEventKind.up) {
+ // A tap on an empty lane: the empty band a press
+ // that never moved would have closed, which is
+ // what clears the selection.
+ root.band-selected(
+ root.seconds-at(self.from-x), root.seconds-at(self.from-x),
+ root.stack-y(self.from-y), root.stack-y(self.from-y),
+ false);
}
}
}
@@ -1182,6 +1252,9 @@ export component Lanes inherits Rectangle {
moved => {
self.to-x = self.mouse-x;
self.to-y = self.mouse-y;
+ if (root.finger && self.pressed) {
+ root.finger-moved(self.mouse-x, self.mouse-y, true);
+ }
}
changed mouse-x => {
@@ -1207,6 +1280,7 @@ export component Lanes inherits Rectangle {
px-per-second: root.px-per-second;
viewport-width: parent.width;
tool: root.tool;
+ edge-grab: root.edge-grab;
// Read back through the lane the clip sits on rather than carried
// on the clip: locking is a property of the lane, and copying it
// onto every clip would be one more thing to keep in step.
@@ -1365,7 +1439,8 @@ export component Lanes inherits Rectangle {
width: 64px;
height: root.ruler-height;
background: Colors.transparent;
- visible: root.tick > 0 && self.x < parent.width;
+ // And none before the cut starts; see the grid.
+ visible: root.tick > 0 && self.seconds >= 0 && self.x < parent.width;
Rectangle {
x: 0;
@@ -1408,6 +1483,17 @@ export component Lanes inherits Rectangle {
if (!self.has-hover) { root.hover-off(); }
}
pointer-event(event) => {
+ if (root.finger) {
+ // The ruler slides with the lanes under a finger;
+ // a tap on it goes to the instant tapped.
+ if (event.kind == PointerEventKind.down) {
+ root.finger-down(self.mouse-x, self.mouse-y);
+ } else if (event.kind == PointerEventKind.up
+ && root.finger-axis == 0) {
+ root.scrubbed(Math.max(0, root.seconds-at(self.mouse-x)));
+ }
+ return;
+ }
if (event.kind == PointerEventKind.down) {
root.scrubbing = true;
root.pointer-x = self.mouse-x;
@@ -1417,6 +1503,12 @@ export component Lanes inherits Rectangle {
}
}
moved => {
+ if (root.finger) {
+ if (self.pressed) {
+ root.finger-moved(self.mouse-x, self.mouse-y, false);
+ }
+ return;
+ }
if (self.pressed) {
root.pointer-x = self.mouse-x;
root.scrubbed(Math.max(0, root.seconds-at(self.mouse-x)));
diff --git a/src/crates/concat/ui/workspace/media-pane.slint b/src/crates/concat/ui/workspace/media-pane.slint
index 927c72f5..74994bd3 100644
--- a/src/crates/concat/ui/workspace/media-pane.slint
+++ b/src/crates/concat/ui/workspace/media-pane.slint
@@ -382,8 +382,12 @@ component ImportButton inherits Rectangle {
// ── one card ─────────────────────────────────────────────────────────────────
-component MediaCard inherits Rectangle {
+export component MediaCard inherits Rectangle {
in property <MediaItemData> item;
+ /// The cross that takes the file out of the bin, shown while the card
+ /// is under the pointer. Off on a phone, where a finger on a card is a
+ /// hover for as long as it presses and the cross would sit under it.
+ in property <bool> removable: true;
/// Faded while it is in the air, so the ghost on the timeline reads as
/// this card moved rather than as a second copy of it.
@@ -542,7 +546,7 @@ component MediaCard inherits Rectangle {
// Hover-only: a permanent delete button on every card in a
// full bin is one bin's worth of invitations to lose work.
- if card.has-hover: Rectangle {
+ if card.has-hover && root.removable: Rectangle {
x: parent.width - self.width - 4px;
y: 4px;
width: 18px;
@@ -1180,7 +1184,7 @@ component PresetCard inherits Rectangle {
// and starred by the same `Library` view the inspector reads - with the
// same auto-fill arithmetic as MediaGrid. Each entry carries its card,
// drawn by the package's own shader (concat_host::cards).
-component ShelfGrid inherits Rectangle {
+export component ShelfGrid inherits Rectangle {
in property <[CatalogueEntryData]> entries;
/// The mark for an entry with no artwork; see CatalogueItemData.
in property <Glyph> glyph: Glyph.sparkle;
@@ -1237,7 +1241,7 @@ component ShelfGrid inherits Rectangle {
// TextInput assigns to `text`, and an assignment replaces the binding
// declared on it - so the box is put back by hand when Rust clears the
// query, which picking a shelf does.
-component ShelfSearch inherits HorizontalLayout {
+export component ShelfSearch inherits HorizontalLayout {
in property <int> shelf;
in property <string> placeholder;
@@ -1287,7 +1291,7 @@ component CategoryPill inherits Rectangle {
}
}
-component CategoryPillBar inherits Rectangle {
+export component CategoryPillBar inherits Rectangle {
in property <[string]> categories: [
"All",
"Featured",
@@ -1344,7 +1348,7 @@ component CategoryPillBar inherits Rectangle {
}
// The Presets shelf: the same auto-fill arithmetic as the other grids.
-component PresetGrid inherits Rectangle {
+export component PresetGrid inherits Rectangle {
in property <[TextPresetData]> items;
callback applied(id: string);
diff --git a/src/crates/concat/ui/workspace/preview-pane.slint b/src/crates/concat/ui/workspace/preview-pane.slint
index dc0a3e36..763afbf5 100644
--- a/src/crates/concat/ui/workspace/preview-pane.slint
+++ b/src/crates/concat/ui/workspace/preview-pane.slint
@@ -657,6 +657,17 @@ export component PreviewPane inherits Rectangle {
/// That row was used.
callback pane-removed();
+ /// The stage alone: no header over it and no transport under it. The
+ /// phone's monitor, which has a transport of its own on the row below
+ /// and states the output nowhere - see ui/phone/. The stage keeps
+ /// every gesture it has: a drag moves a picture, a press on the well
+ /// pans the view, a double tap fits it again.
+ in property <bool> bare: false;
+
+ /// Fits the frame to the pane again, from outside: the phone's way to
+ /// the button the transport carries.
+ public function fit-view() { viewport.fit(); }
+
property <[int]> ratios-w: [1920, 3840, 1080, 1080, 1440, 2560];
property <[int]> ratios-h: [1080, 2160, 1920, 1080, 1080, 1080];
property <[string]> ratio-names: ["16:9", "16:9 4K", "9:16", "1:1", "4:3", "21:9"];
@@ -677,7 +688,7 @@ export component PreviewPane inherits Rectangle {
changed frames => { root.seed(); }
Pane {
- PaneHeader {
+ if !root.bare: PaneHeader {
title: I18n.t("common.preview");
// The output, stated rather than implied. Tabular-ish and dim: it
@@ -716,7 +727,9 @@ export component PreviewPane inherits Rectangle {
background: Theme.well;
clip: true;
- property <length> pad: 16px;
+ // Less air on a phone, where the pane is the screen's width and
+ // every pixel of margin is a pixel the picture does not get.
+ property <length> pad: root.bare ? 8px : 16px;
property <length> room-w: Math.max(1px, self.width - 2 * self.pad);
property <length> room-h: Math.max(1px, self.height - 2 * self.pad);
@@ -928,7 +941,7 @@ export component PreviewPane inherits Rectangle {
}
// ── the transport ────────────────────────────────────────────────
- Rectangle {
+ if !root.bare: Rectangle {
height: 46px;
background: Theme.panel;