Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

Merge upstream/main 43b14883 into the Smart Filters branch

abc2cba335b58e2170
diff --cc crates/ui-egui/src/i18n/cs.tsv
index 6b7310a2e,a5078d1c9..6da06d080
--- a/crates/ui-egui/src/i18n/cs.tsv
+++ b/crates/ui-egui/src/i18n/cs.tsv
@@@ -2667,15 -2667,27 +2667,36 @@@ cameraData Lens Objekti
Duplicate Layer Duplikovat vrstvu
Contract Zúžit
+ Animation Options Možnosti animace
+ Entire Document Celý dokument
+ Filter Options Možnosti filtrování
+ Layer Bounds Hranice vrstvy
+ Layers Panel Options Možnosti panelu Vrstvy
+ Lock Layers Zamknout vrstvy
+ New Artboard… Nové kreslicí plátno…
+ New Group Nová skupina
+ New Group… Nová skupina…
+ New Layer… Nová vrstva…
+ Panel Options… Možnosti panelu…
+ Prevent Auto-Nesting Zabránit automatickému vnoření
+ Show Layers Zobrazit vrstvy
+ Thumbnail Contents Obsah miniatur
+ Thumbnail Size Velikost miniatur
+ Use Default Masks on Fill Layers Používat výchozí masky u vrstev výplně
+ Expand New Effects Rozbalovat nové efekty
+ Add “copy” to Copied Layers and Groups Přidávat „kopie“ ke kopírovaným vrstvám a skupinám
+ Preview on canvas when reordering layers Zobrazovat náhled na plátně při změně pořadí vrstev
+ Show layer mask badges Zobrazovat odznaky masek vrstev
+
+# Smart Filter editors
+ Blending Options ({filter}) Volby prolnutí ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) Skrýt efekty vrstvy a inteligentní filtry (kliknutí s {key}: všechny vrstvy)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) Zobrazit efekty vrstvy a inteligentní filtry (kliknutí s {key}: všechny vrstvy)
+ Wait for the current job to finish. Počkejte na dokončení aktuální úlohy.
+ The document or Smart Filter changed. Reopen its dialog. Dokument nebo inteligentní filtr se změnil. Znovu otevřete jeho dialog.
+ Opacity must be between 0% and 100%. Krytí musí být mezi 0% a 100%.
+ Dissolve is approximated: it blends without Photoshop's dither. Režim Rozpustit je pouze aproximován: prolíná bez ditheringu Photoshopu.
+
# Dynamic labels the tl! literal scanner cannot see: filter and Filter Gallery parameter names and
# choices (humanized from their keys), Camera Raw controls, render filters (Flame, Picture Frame, Tree),
# measurement columns, file info fields and the macOS application menu. Translated the same way as
diff --cc crates/ui-egui/src/i18n/de.tsv
index abe779e8d,fdb81efa3..53dffd014
--- a/crates/ui-egui/src/i18n/de.tsv
+++ b/crates/ui-egui/src/i18n/de.tsv
@@@ -2699,14 -2699,25 +2699,34 @@@ cameraData Lens Objekti
Duplicate Layer Ebene duplizieren
Contract Verkleinern
+ Animation Options Animationsoptionen
+ Entire Document Gesamtes Dokument
+ Filter Options Filteroptionen
+ Layer Bounds Ebenenbegrenzungen
+ Layers Panel Options Optionen des Ebenenbedienfelds
+ Lock Layers Ebenen sperren
+ New Artboard… Neue Zeichenfläche…
+ New Group… Neue Gruppe…
+ New Layer… Neue Ebene…
+ Panel Options… Bedienfeldoptionen…
+ Prevent Auto-Nesting Automatisches Verschachteln verhindern
+ Show Layers Ebenen einblenden
+ Thumbnail Contents Miniaturinhalt
+ Thumbnail Size Miniaturgröße
+ Use Default Masks on Fill Layers Standardmasken für Füllebenen verwenden
+ Expand New Effects Neue Effekte aufklappen
+ Add “copy” to Copied Layers and Groups „Kopie“ zu kopierten Ebenen und Gruppen hinzufügen
+ Preview on canvas when reordering layers Vorschau auf der Arbeitsfläche beim Neuanordnen von Ebenen
+ Show layer mask badges Ebenenmasken-Abzeichen anzeigen
++
+# Smart Filter editors
+ Blending Options ({filter}) Fülloptionen ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) Ebeneneffekte und Smartfilter ausblenden ({key}-Klick: alle Ebenen)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) Ebeneneffekte und Smartfilter einblenden ({key}-Klick: alle Ebenen)
+ Wait for the current job to finish. Warten Sie, bis der aktuelle Auftrag abgeschlossen ist.
+ The document or Smart Filter changed. Reopen its dialog. Das Dokument oder der Smartfilter wurde geändert. Öffnen Sie den Dialog erneut.
+ Opacity must be between 0% and 100%. Die Deckkraft muss zwischen 0% und 100% liegen.
+ Dissolve is approximated: it blends without Photoshop's dither. Sprenkeln wird nur angenähert: Es wird ohne das Dithering von Photoshop gemischt.
Loading fonts… Schriften werden geladen…
Response curve Reaktionskurve
Tool Werkzeug
diff --cc crates/ui-egui/src/i18n/el.tsv
index e06d8726b,d223332db..0260e2738
--- a/crates/ui-egui/src/i18n/el.tsv
+++ b/crates/ui-egui/src/i18n/el.tsv
@@@ -3753,14 -3753,22 +3753,31 @@@ cameraData Lens Φακό�
Output Settings Ρυθμίσεις εξόδου
Output To Έξοδος σε
+ Animation Options Επιλογές κίνησης
+ Entire Document Ολόκληρο έγγραφο
+ Filter Options Επιλογές φίλτρου
+ Layer Bounds Όρια επιπέδου
+ Layers Panel Options Επιλογές πίνακα επιπέδων
+ New Artboard… Νέος πίνακας σχεδίασης…
+ New Group… Νέα ομάδα…
+ Prevent Auto-Nesting Αποτροπή αυτόματης ένθεσης
+ Show Layers Εμφάνιση επιπέδων
+ Thumbnail Contents Περιεχόμενο μικρογραφιών
+ Thumbnail Size Μέγεθος μικρογραφιών
+ Use Default Masks on Fill Layers Χρήση προεπιλεγμένων μασκών σε επίπεδα γεμίσματος
+ Expand New Effects Ανάπτυξη νέων εφέ
+ Add “copy” to Copied Layers and Groups Προσθήκη «αντίγραφο» σε αντιγραμμένα επίπεδα και ομάδες
+ Preview on canvas when reordering layers Προεπισκόπηση στον καμβά κατά την αναδιάταξη επιπέδων
+ Show layer mask badges Εμφάνιση σημάτων μασκών επιπέδου
++
+# Smart Filter editors
+ Blending Options ({filter}) Επιλογές ανάμειξης ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) Απόκρυψη εφέ επιπέδου και έξυπνων φίλτρων ({key}-κλικ: όλα τα επίπεδα)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) Εμφάνιση εφέ επιπέδου και έξυπνων φίλτρων ({key}-κλικ: όλα τα επίπεδα)
+ Wait for the current job to finish. Περιμένετε να ολοκληρωθεί η τρέχουσα εργασία.
+ The document or Smart Filter changed. Reopen its dialog. Το έγγραφο ή το έξυπνο φίλτρο άλλαξε. Ανοίξτε ξανά το παράθυρό του.
+ Opacity must be between 0% and 100%. Η αδιαφάνεια πρέπει να είναι μεταξύ 0% και 100%.
+ Dissolve is approximated: it blends without Photoshop's dither. Η Διάλυση προσεγγίζεται: η ανάμειξη γίνεται χωρίς το dither του Photoshop.
Loading fonts… Φόρτωση γραμματοσειρών…
Response curve Καμπύλη απόκρισης
Simulate Pressure Προσομοίωση πίεσης
diff --cc crates/ui-egui/src/i18n/es.tsv
index 174cf8414,5e42c5fac..8f33c0f89
--- a/crates/ui-egui/src/i18n/es.tsv
+++ b/crates/ui-egui/src/i18n/es.tsv
@@@ -2739,14 -2739,25 +2739,34 @@@ cameraData Lens Objetiv
Output Settings Ajustes de salida
Output To Salida a
+ Animation Options Opciones de animación
+ Entire Document Documento entero
+ Filter Options Opciones de filtro
+ Layer Bounds Límites de capa
+ Layers Panel Options Opciones del panel Capas
+ Lock Layers Bloquear capas
+ New Artboard… Nueva mesa de trabajo…
+ New Group… Nuevo grupo…
+ New Layer… Nueva capa…
+ Panel Options… Opciones de panel…
+ Prevent Auto-Nesting Impedir anidación automática
+ Show Layers Mostrar capas
+ Thumbnail Contents Contenido de miniaturas
+ Thumbnail Size Tamaño de miniaturas
+ Use Default Masks on Fill Layers Usar máscaras predeterminadas en capas de relleno
+ Expand New Effects Expandir nuevos efectos
+ Add “copy” to Copied Layers and Groups Añadir «copia» a las capas y grupos duplicados
+ Preview on canvas when reordering layers Previsualizar en el lienzo al reordenar capas
+ Show layer mask badges Mostrar insignias de máscaras de capa
++
+# Smart Filter editors
+ Blending Options ({filter}) Opciones de fusión ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) Ocultar efectos de capa y filtros inteligentes ({key}-clic: todas las capas)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) Mostrar efectos de capa y filtros inteligentes ({key}-clic: todas las capas)
+ Wait for the current job to finish. Espere a que termine la tarea actual.
+ The document or Smart Filter changed. Reopen its dialog. El documento o el filtro inteligente ha cambiado. Vuelva a abrir su diálogo.
+ Opacity must be between 0% and 100%. La opacidad debe estar entre 0% y 100%.
+ Dissolve is approximated: it blends without Photoshop's dither. Disolver es aproximado: se fusiona sin el tramado de Photoshop.
Loading fonts… Cargando fuentes…
Response curve Curva de respuesta
Tool Herramienta
diff --cc crates/ui-egui/src/i18n/fr.tsv
index 0dc584728,22ea32f47..6bfdfe264
--- a/crates/ui-egui/src/i18n/fr.tsv
+++ b/crates/ui-egui/src/i18n/fr.tsv
@@@ -3075,14 -3075,23 +3075,32 @@@ cameraData Lens Objecti
Duplicate Layer Dupliquer le calque
Contract Contracter
+ Animation Options Options d’animation
+ Entire Document Document entier
+ Filter Options Options de filtrage
+ Layer Bounds Limites du calque
+ Layers Panel Options Options du panneau Calques
+ Lock Layers Verrouiller les calques
+ New Artboard… Nouveau plan de travail…
+ New Group… Nouveau groupe…
+ Prevent Auto-Nesting Empêcher l’imbrication automatique
+ Show Layers Afficher les calques
+ Thumbnail Contents Contenu des vignettes
+ Thumbnail Size Taille des vignettes
+ Use Default Masks on Fill Layers Utiliser les masques par défaut sur les calques de remplissage
+ Expand New Effects Développer les nouveaux effets
+ Add “copy” to Copied Layers and Groups Ajouter « copie » aux calques et groupes dupliqués
+ Preview on canvas when reordering layers Prévisualiser sur la zone de travail lors du réagencement des calques
+ Show layer mask badges Afficher les badges des masques de fusion
++
+# Smart Filter editors
+ Blending Options ({filter}) Options de fusion ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) Masquer les effets du calque et les filtres dynamiques ({key}-clic : tous les calques)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) Afficher les effets du calque et les filtres dynamiques ({key}-clic : tous les calques)
+ Wait for the current job to finish. Attendez la fin de la tâche en cours.
+ The document or Smart Filter changed. Reopen its dialog. Le document ou le filtre dynamique a changé. Rouvrez sa boîte de dialogue.
+ Opacity must be between 0% and 100%. L'opacité doit être comprise entre 0% et 100%.
+ Dissolve is approximated: it blends without Photoshop's dither. Le mode Fondu est approximé : il fusionne sans le tramage de Photoshop.
Loading fonts… Chargement des polices…
Response curve Courbe de réponse
Tool Outil
diff --cc crates/ui-egui/src/i18n/hu.tsv
index 596afb7e0,905b2806f..4dd9fcfb2
--- a/crates/ui-egui/src/i18n/hu.tsv
+++ b/crates/ui-egui/src/i18n/hu.tsv
@@@ -4153,13 -4153,22 +4153,30 @@@ cameraRaw Yellow Sárg
Ellipse Ellipszis
# Layers panel options and Smart Filter editors
+ Add “copy” to Copied Layers and Groups „másolat” hozzáadása a másolt rétegekhez és csoportokhoz
+ Animation Options Animációs beállítások
+ Entire Document Teljes dokumentum
+ Expand New Effects Új effektusok kibontása
+ Filter Options Szűrési beállítások
+ Layer Bounds Réteghatárok
+ Layers Panel Options Rétegek panel beállításai
+ New Artboard… Új rajztábla…
+ New Group… Új csoport…
+ Prevent Auto-Nesting Automatikus beágyazás tiltása
+ Preview on canvas when reordering layers Előnézet a vásznon a rétegek átrendezésekor
+ Show Layers Rétegek megjelenítése
+ Show layer mask badges Rétegmaszk-jelvények megjelenítése
+ Thumbnail Contents Bélyegkép tartalma
+ Thumbnail Size Bélyegképméret
+ Use Default Masks on Fill Layers Alapértelmezett maszkok kitöltőrétegeken
++
+ Blending Options ({filter}) Keverési beállítások ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) A réteg effektusainak és intelligens szűrőinek elrejtése ({key}+kattintás: minden réteg)
+ Opacity must be between 0% and 100%. Az átlátszatlanságnak 0% és 100% között kell lennie.
+ Dissolve is approximated: it blends without Photoshop's dither. A Szétszórás csak közelítés: a Photoshop raszterezése nélkül keveredik.
+ Show the layer's effects and Smart Filters ({key}-click: all layers) A réteg effektusainak és intelligens szűrőinek megjelenítése ({key}+kattintás: minden réteg)
+ The document or Smart Filter changed. Reopen its dialog. A dokumentum vagy az intelligens szűrő megváltozott. Nyisd meg újra a párbeszédablakát.
+ Wait for the current job to finish. Várd meg, amíg az aktuális feladat befejeződik.
Accept and Go to Conflict Elfogadás és ugrás az ütközéshez
Changes undone. Változások visszavonva.
Choose a new shortcut for this command, or leave it without one. Válasszon új billentyűparancsot ehhez a parancshoz, vagy hagyja nélküle.
diff --cc crates/ui-egui/src/i18n/id.tsv
index ff9a4e3d3,c0da1810e..06ac2f239
--- a/crates/ui-egui/src/i18n/id.tsv
+++ b/crates/ui-egui/src/i18n/id.tsv
@@@ -3062,14 -3062,23 +3062,32 @@@ cameraData Lens Lens
Duplicate Layer Duplikat Layer
Contract Ciutkan
+ Animation Options Opsi Animasi
+ Entire Document Seluruh Dokumen
+ Filter Options Opsi Filter
+ Layer Bounds Batas Lapisan
+ Layers Panel Options Opsi Panel Lapisan
+ Lock Layers Kunci Lapisan
+ New Artboard… Artboard Baru…
+ New Group… Grup Baru…
+ Prevent Auto-Nesting Cegah Pengelompokan Otomatis
+ Show Layers Tampilkan Lapisan
+ Thumbnail Contents Isi Gambar Mini
+ Thumbnail Size Ukuran Gambar Mini
+ Use Default Masks on Fill Layers Gunakan Masker Default pada Lapisan Isian
+ Expand New Effects Perluas Efek Baru
+ Add “copy” to Copied Layers and Groups Tambahkan “salinan” ke Lapisan dan Grup yang Disalin
+ Preview on canvas when reordering layers Pratinjau pada kanvas saat mengurutkan ulang lapisan
+ Show layer mask badges Tampilkan Lencana Masker Lapisan
++
+# Smart Filter editors
+ Blending Options ({filter}) Opsi Pencampuran ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) Sembunyikan efek lapisan dan Filter Cerdas (klik-{key}: semua lapisan)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) Tampilkan efek lapisan dan Filter Cerdas (klik-{key}: semua lapisan)
+ Wait for the current job to finish. Tunggu hingga tugas saat ini selesai.
+ The document or Smart Filter changed. Reopen its dialog. Dokumen atau Filter Cerdas berubah. Buka kembali dialognya.
+ Opacity must be between 0% and 100%. Opasitas harus antara 0% dan 100%.
+ Dissolve is approximated: it blends without Photoshop's dither. Dissolve hanya didekati: pencampuran berjalan tanpa dither Photoshop.
Loading fonts… Memuat font…
Response curve Kurva respons
Tool Alat
diff --cc crates/ui-egui/src/i18n/it.tsv
index 376573c4f,d9a5d4188..83534859d
--- a/crates/ui-egui/src/i18n/it.tsv
+++ b/crates/ui-egui/src/i18n/it.tsv
@@@ -2727,14 -2727,22 +2727,31 @@@ cameraData Lens Obiettiv
Output Settings Impostazioni di output
Output To Output in
+ Animation Options Opzioni animazione
+ Entire Document Documento intero
+ Filter Options Opzioni filtro
+ Layer Bounds Limiti livello
+ Layers Panel Options Opzioni pannello Livelli
+ New Artboard… Nuova tavola da disegno…
+ New Group… Nuovo gruppo…
+ Prevent Auto-Nesting Impedisci annidamento automatico
+ Show Layers Mostra livelli
+ Thumbnail Contents Contenuto miniature
+ Thumbnail Size Dimensione miniature
+ Use Default Masks on Fill Layers Usa maschere predefinite sui livelli di riempimento
+ Expand New Effects Espandi nuovi effetti
+ Add “copy” to Copied Layers and Groups Aggiungi «copia» ai livelli e ai gruppi duplicati
+ Preview on canvas when reordering layers Anteprima sulla tela durante il riordino dei livelli
+ Show layer mask badges Mostra distintivi delle maschere di livello
++
+# Smart Filter editors
+ Blending Options ({filter}) Opzioni di fusione ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) Nascondi effetti del livello e filtri avanzati ({key}-clic: tutti i livelli)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) Mostra effetti del livello e filtri avanzati ({key}-clic: tutti i livelli)
+ Wait for the current job to finish. Attendi il completamento dell'attività corrente.
+ The document or Smart Filter changed. Reopen its dialog. Il documento o il filtro avanzato è cambiato. Riapri la sua finestra di dialogo.
+ Opacity must be between 0% and 100%. L'opacità deve essere compresa tra 0% e 100%.
+ Dissolve is approximated: it blends without Photoshop's dither. Dissolvi è approssimato: la fusione avviene senza il dither di Photoshop.
Loading fonts… Caricamento font…
Response curve Curva di risposta
Tool Strumento
diff --cc crates/ui-egui/src/i18n/ja.tsv
index 6d0f2d179,f2bf77387..79df5691f
--- a/crates/ui-egui/src/i18n/ja.tsv
+++ b/crates/ui-egui/src/i18n/ja.tsv
@@@ -3668,14 -3668,22 +3668,31 @@@ cameraData Lens レン�
Output Settings 出力設定
Output To 出力先
+ Animation Options アニメーションオプション
+ Entire Document ドキュメント全体
+ Filter Options フィルターオプション
+ Layer Bounds レイヤーの境界
+ Layers Panel Options レイヤーパネルオプション
+ New Artboard… 新規アートボード…
+ New Group… 新規グループ…
+ Prevent Auto-Nesting 自動的な入れ子を防ぐ
+ Show Layers レイヤーを表示
+ Thumbnail Contents サムネールの内容
+ Thumbnail Size サムネールのサイズ
+ Use Default Masks on Fill Layers 塗りつぶしレイヤーにデフォルトのマスクを使用
+ Expand New Effects 新しい効果を展開
+ Add “copy” to Copied Layers and Groups コピーしたレイヤーとグループの名前に「コピー」を追加
+ Preview on canvas when reordering layers レイヤーの並べ替え時にカンバスでプレビュー
+ Show layer mask badges レイヤーマスクのバッジを表示
++
+# Smart Filter editors
+ Blending Options ({filter}) 描画オプション ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) レイヤー効果とスマートフィルターを非表示 ({key}+クリック: すべてのレイヤー)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) レイヤー効果とスマートフィルターを表示 ({key}+クリック: すべてのレイヤー)
+ Wait for the current job to finish. 現在の処理が完了するまでお待ちください。
+ The document or Smart Filter changed. Reopen its dialog. ドキュメントまたはスマートフィルターが変更されました。ダイアログを開き直してください。
+ Opacity must be between 0% and 100%. 不透明度は0%から100%の範囲で指定してください。
+ Dissolve is approximated: it blends without Photoshop's dither. ディザ合成は近似です。Photoshop のディザなしでブレンドします。
Loading fonts… フォントを読み込み中…
Response curve 応答カーブ
Simulate Pressure 筆圧をシミュレート
diff --cc crates/ui-egui/src/i18n/ko.tsv
index a896c5079,f73e7d047..ac546da1a
--- a/crates/ui-egui/src/i18n/ko.tsv
+++ b/crates/ui-egui/src/i18n/ko.tsv
@@@ -3243,14 -3243,25 +3243,34 @@@ cameraData Lens 렌�
Output Settings 출력 설정
Output To 출력 위치
+ Animation Options 애니메이션 옵션
+ Entire Document 전체 문서
+ Filter Options 필터 옵션
+ Layer Bounds 레이어 경계
+ Layers Panel Options 레이어 패널 옵션
+ New Artboard… 새 아트보드…
+ New Group 새 그룹
+ New Group… 새 그룹…
+ New Layer… 새 레이어…
+ Panel Options… 패널 옵션…
+ Prevent Auto-Nesting 자동 중첩 방지
+ Show Layers 레이어 표시
+ Thumbnail Contents 축소판 내용
+ Thumbnail Size 축소판 크기
+ Use Default Masks on Fill Layers 칠 레이어에 기본 마스크 사용
+ Expand New Effects 새 효과 펼치기
+ Add “copy” to Copied Layers and Groups 복사한 레이어 및 그룹에 “복사” 추가
+ Preview on canvas when reordering layers 레이어 순서 변경 시 캔버스에서 미리보기
+ Show layer mask badges 레이어 마스크 배지 표시
++
+# Smart Filter editors
+ Blending Options ({filter}) 혼합 옵션 ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) 레이어 효과 및 스마트 필터 숨기기 ({key}+클릭: 모든 레이어)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) 레이어 효과 및 스마트 필터 표시 ({key}+클릭: 모든 레이어)
+ Wait for the current job to finish. 현재 작업이 완료될 때까지 기다리세요.
+ The document or Smart Filter changed. Reopen its dialog. 문서 또는 스마트 필터가 변경되었습니다. 대화 상자를 다시 여세요.
+ Opacity must be between 0% and 100%. 불투명도는 0%에서 100% 사이여야 합니다.
+ Dissolve is approximated: it blends without Photoshop's dither. 디졸브는 근사치입니다. Photoshop의 디더링 없이 혼합됩니다.
Loading fonts… 글꼴 불러오는 중…
Response curve 응답 곡선
Simulate Pressure 압력 시뮬레이션
diff --cc crates/ui-egui/src/i18n/nl.tsv
index f1e8f8ce9,6d37317aa..f3fb21755
--- a/crates/ui-egui/src/i18n/nl.tsv
+++ b/crates/ui-egui/src/i18n/nl.tsv
@@@ -3812,14 -3812,22 +3812,31 @@@ cameraData Lens Len
Output Settings Uitvoerinstellingen
Output To Uitvoer naar
+ Animation Options Animatieopties
+ Entire Document Hele document
+ Filter Options Filteropties
+ Layer Bounds Laaggrenzen
+ Layers Panel Options Opties van het deelvenster Lagen
+ New Artboard… Nieuw tekengebied…
+ New Group… Nieuwe groep…
+ Prevent Auto-Nesting Automatisch nesten voorkomen
+ Show Layers Lagen tonen
+ Thumbnail Contents Inhoud van miniaturen
+ Thumbnail Size Grootte van miniaturen
+ Use Default Masks on Fill Layers Standaardmaskers gebruiken op opvullagen
+ Expand New Effects Nieuwe effecten uitvouwen
+ Add “copy” to Copied Layers and Groups „kopie” toevoegen aan gekopieerde lagen en groepen
+ Preview on canvas when reordering layers Voorvertoning op canvas bij herschikken van lagen
+ Show layer mask badges Badges voor laagmaskers tonen
++
+# Smart Filter editors
+ Blending Options ({filter}) Overvloeiopties ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) Laageffecten en slimme filters verbergen ({key}-klik: alle lagen)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) Laageffecten en slimme filters tonen ({key}-klik: alle lagen)
+ Wait for the current job to finish. Wacht tot de huidige taak is voltooid.
+ The document or Smart Filter changed. Reopen its dialog. Het document of het slimme filter is gewijzigd. Open het dialoogvenster opnieuw.
+ Opacity must be between 0% and 100%. De dekking moet tussen 0% en 100% liggen.
+ Dissolve is approximated: it blends without Photoshop's dither. Verspreiden is benaderd: het mengt zonder de dither van Photoshop.
Loading fonts… Lettertypen laden…
Response curve Responscurve
Simulate Pressure Druk simuleren
diff --cc crates/ui-egui/src/i18n/pl.tsv
index d273863e7,cc26dcdb8..3509b7cdd
--- a/crates/ui-egui/src/i18n/pl.tsv
+++ b/crates/ui-egui/src/i18n/pl.tsv
@@@ -3670,14 -3670,22 +3670,31 @@@ cameraData Lens Obiekty
Output Settings Ustawienia wyjścia
Output To Wyjście do
+ Animation Options Opcje animacji
+ Entire Document Cały dokument
+ Filter Options Opcje filtrowania
+ Layer Bounds Granice warstwy
+ Layers Panel Options Opcje panelu Warstwy
+ New Artboard… Nowy obszar roboczy…
+ New Group… Nowa grupa…
+ Prevent Auto-Nesting Zapobiegaj automatycznemu zagnieżdżaniu
+ Show Layers Pokaż warstwy
+ Thumbnail Contents Zawartość miniaturek
+ Thumbnail Size Rozmiar miniaturek
+ Use Default Masks on Fill Layers Użyj domyślnych masek na warstwach wypełnienia
+ Expand New Effects Rozwijaj nowe efekty
+ Add “copy” to Copied Layers and Groups Dodawaj „kopia” do skopiowanych warstw i grup
+ Preview on canvas when reordering layers Podgląd na obszarze roboczym podczas zmiany kolejności warstw
+ Show layer mask badges Pokaż odznaki masek warstw
++
+# Smart Filter editors
+ Blending Options ({filter}) Opcje mieszania ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) Ukryj efekty warstwy i inteligentne filtry (kliknięcie z {key}: wszystkie warstwy)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) Pokaż efekty warstwy i inteligentne filtry (kliknięcie z {key}: wszystkie warstwy)
+ Wait for the current job to finish. Poczekaj na zakończenie bieżącego zadania.
+ The document or Smart Filter changed. Reopen its dialog. Dokument lub inteligentny filtr został zmieniony. Otwórz ponownie jego okno dialogowe.
+ Opacity must be between 0% and 100%. Krycie musi wynosić od 0% do 100%.
+ Dissolve is approximated: it blends without Photoshop's dither. Rozpuszczanie jest przybliżone: miesza się bez ditheringu Photoshopa.
Loading fonts… Wczytywanie czcionek…
Response curve Krzywa odpowiedzi
Simulate Pressure Symuluj nacisk
diff --cc crates/ui-egui/src/i18n/pt-br.tsv
index 27e1c7d79,0b681f25d..f5ea4a958
--- a/crates/ui-egui/src/i18n/pt-br.tsv
+++ b/crates/ui-egui/src/i18n/pt-br.tsv
@@@ -3079,14 -3079,22 +3079,31 @@@ cameraData Lens Lent
Duplicate Layer Duplicar camada
Contract Contrair
+ Animation Options Opções de animação
+ Entire Document Documento inteiro
+ Filter Options Opções de filtro
+ Layer Bounds Limites da camada
+ Layers Panel Options Opções do painel Camadas
+ New Artboard… Nova prancheta…
+ New Group… Novo grupo…
+ Prevent Auto-Nesting Impedir aninhamento automático
+ Show Layers Mostrar camadas
+ Thumbnail Contents Conteúdo das miniaturas
+ Thumbnail Size Tamanho das miniaturas
+ Use Default Masks on Fill Layers Usar máscaras padrão nas camadas de preenchimento
+ Expand New Effects Expandir novos efeitos
+ Add “copy” to Copied Layers and Groups Adicionar “cópia” às camadas e grupos copiados
+ Preview on canvas when reordering layers Pré-visualizar na tela ao reordenar camadas
+ Show layer mask badges Mostrar emblemas de máscaras de camada
++
+# Smart Filter editors
+ Blending Options ({filter}) Opções de mesclagem ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) Ocultar efeitos da camada e Filtros Inteligentes ({key}-clique: todas as camadas)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) Mostrar efeitos da camada e Filtros Inteligentes ({key}-clique: todas as camadas)
+ Wait for the current job to finish. Aguarde a conclusão da tarefa atual.
+ The document or Smart Filter changed. Reopen its dialog. O documento ou o Filtro Inteligente mudou. Reabra sua caixa de diálogo.
+ Opacity must be between 0% and 100%. A opacidade deve estar entre 0% e 100%.
+ Dissolve is approximated: it blends without Photoshop's dither. Dissolver é aproximado: a mesclagem ocorre sem o dither do Photoshop.
Loading fonts… Carregando fontes…
Response curve Curva de resposta
Tool Ferramenta
diff --cc crates/ui-egui/src/i18n/ru.tsv
index cc8bfe294,a4bb5bf91..3c807e18e
--- a/crates/ui-egui/src/i18n/ru.tsv
+++ b/crates/ui-egui/src/i18n/ru.tsv
@@@ -2999,14 -2999,23 +2999,32 @@@ cameraData Lens Объекти�
Duplicate Layer Дубликат слоя
Contract Сжать
+ Animation Options Параметры анимации
+ Entire Document Весь документ
+ Filter Options Параметры фильтра
+ Layer Bounds Границы слоя
+ Layers Panel Options Параметры панели «Слои»
+ Lock Layers Блокировка слоёв
+ New Artboard… Новая монтажная область…
+ New Group… Новая группа…
+ Prevent Auto-Nesting Запретить автоматическое вложение
+ Show Layers Показать слои
+ Thumbnail Contents Содержимое миниатюр
+ Thumbnail Size Размер миниатюр
+ Use Default Masks on Fill Layers Использовать маски по умолчанию для слоёв-заливок
+ Expand New Effects Раскрывать новые эффекты
+ Add “copy” to Copied Layers and Groups Добавлять «копия» к дублированным слоям и группам
+ Preview on canvas when reordering layers Предпросмотр на холсте при изменении порядка слоёв
+ Show layer mask badges Показывать значки типов масок слоя
++
+# Smart Filter editors
+ Blending Options ({filter}) Параметры наложения ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) Скрыть эффекты слоя и смарт-фильтры ({key}-клик: все слои)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) Показать эффекты слоя и смарт-фильтры ({key}-клик: все слои)
+ Wait for the current job to finish. Дождитесь завершения текущей задачи.
+ The document or Smart Filter changed. Reopen its dialog. Документ или смарт-фильтр изменился. Откройте его диалог заново.
+ Opacity must be between 0% and 100%. Непрозрачность должна быть от 0% до 100%.
+ Dissolve is approximated: it blends without Photoshop's dither. Растворение приближённое: смешивание без дизеринга Photoshop.
Loading fonts… Загрузка шрифтов…
Response curve Кривая отклика
Tool Инструмент
diff --cc crates/ui-egui/src/i18n/sr.tsv
index 63a322c19,3190bed32..307f6ddb0
--- a/crates/ui-egui/src/i18n/sr.tsv
+++ b/crates/ui-egui/src/i18n/sr.tsv
@@@ -4306,14 -4306,23 +4306,32 @@@ shape Appearance Izgle
Lines/Centimeter Linija/centimetar
Ellipse Elipsa
+ # Layers panel options
+ Add “copy” to Copied Layers and Groups Dodaj „kopija” kopiranim slojevima i grupama
+ Animation Options Opcije animacije
+ Entire Document Ceo dokument
+ Expand New Effects Proširi nove efekte
+ Filter Options Opcije filtera
+ Layer Bounds Granice sloja
+ Layers Panel Options Opcije panela Slojevi
+ New Artboard… Nova radna tabla…
+ New Group… Nova grupa…
+ Prevent Auto-Nesting Spreči automatsko ugnežđavanje
+ Preview on canvas when reordering layers Pregled na platnu pri promeni redosleda slojeva
+ Show Layers Prikaži slojeve
+ Show layer mask badges Prikaži oznake maske sloja
+ Thumbnail Contents Sadržaj sličice
+ Thumbnail Size Veličina sličice
+ Use Default Masks on Fill Layers Koristi podrazumevane maske na slojevima popune
++
+# Smart Filter editors
+ Blending Options ({filter}) Opcije stapanja ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) Sakrij efekte i pametne filtere sloja ({key}-klik: svi slojevi)
+ Opacity must be between 0% and 100%. Neprozirnost mora biti između 0% i 100%.
+ Dissolve is approximated: it blends without Photoshop's dither. Rastapanje je približno: mešanje se vrši bez diteringa programa Photoshop.
+ Show the layer's effects and Smart Filters ({key}-click: all layers) Prikaži efekte i pametne filtere sloja ({key}-klik: svi slojevi)
+ The document or Smart Filter changed. Reopen its dialog. Dokument ili pametni filter se promenio. Ponovo otvorite njegov dijalog.
+ Wait for the current job to finish. Sačekajte da se trenutni posao završi.
Accept and Go to Conflict Prihvati i idi na sukob
Changes undone. Izmene su poništene.
Choose a new shortcut for this command, or leave it without one. Izaberite novu prečicu za ovu komandu ili je ostavite bez prečice.
diff --cc crates/ui-egui/src/i18n/tr.tsv
index ddd6181ef,5ead3d52c..be8595ff5
--- a/crates/ui-egui/src/i18n/tr.tsv
+++ b/crates/ui-egui/src/i18n/tr.tsv
@@@ -3964,13 -3964,22 +3964,30 @@@ cameraData Lens Len
Ellipse Elips
# Layers panel options and Smart Filter editors
+ Add “copy” to Copied Layers and Groups Kopyalanan Katman ve Gruplara “kopya” Ekle
+ Animation Options Animasyon Seçenekleri
+ Entire Document Tüm Belge
+ Expand New Effects Yeni Efektleri Genişlet
+ Filter Options Filtre Seçenekleri
+ Layer Bounds Katman Sınırları
+ Layers Panel Options Katmanlar Paneli Seçenekleri
+ New Artboard… Yeni Çalışma Yüzeyi…
+ New Group… Yeni Grup…
+ Prevent Auto-Nesting Otomatik Yerleştirmeyi Önle
+ Preview on canvas when reordering layers Katmanları yeniden sıralarken kanvasta önizle
+ Show Layers Katmanları Göster
+ Show layer mask badges Katman maskesi rozetlerini göster
+ Thumbnail Contents Küçük Resim İçeriği
+ Thumbnail Size Küçük Resim Boyutu
+ Use Default Masks on Fill Layers Dolgu Katmanlarında Varsayılan Maskeleri Kullan
++
+ Blending Options ({filter}) Karışım Seçenekleri ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) Katmanın efektlerini ve Akıllı Filtrelerini gizle ({key}-tık: tüm katmanlar)
+ Opacity must be between 0% and 100%. Opaklık %0 ile %100 arasında olmalıdır.
+ Dissolve is approximated: it blends without Photoshop's dither. Eritme yaklaşık olarak uygulanır: Photoshop'un dither'ı olmadan karıştırır.
+ Show the layer's effects and Smart Filters ({key}-click: all layers) Katmanın efektlerini ve Akıllı Filtrelerini göster ({key}-tık: tüm katmanlar)
+ The document or Smart Filter changed. Reopen its dialog. Belge veya Akıllı Filtre değişti. İletişim kutusunu yeniden açın.
+ Wait for the current job to finish. Geçerli işin bitmesini bekleyin.
Accept and Go to Conflict Kabul Et ve Çakışmaya Git
Changes undone. Değişiklikler geri alındı.
Choose a new shortcut for this command, or leave it without one. Bu komut için yeni bir kısayol seçin veya kısayolsuz bırakın.
diff --cc crates/ui-egui/src/i18n/uk.tsv
index 7c53a0e38,4c3af9f40..c876a06b4
--- a/crates/ui-egui/src/i18n/uk.tsv
+++ b/crates/ui-egui/src/i18n/uk.tsv
@@@ -3744,14 -3744,22 +3744,31 @@@ cameraData Lens Об'єкти�
Output Settings Параметри виводу
Output To Вивести в
+ Animation Options Параметри анімації
+ Entire Document Увесь документ
+ Filter Options Параметри фільтрів
+ Layer Bounds Межі шару
+ Layers Panel Options Параметри панелі «Шари»
+ New Artboard… Нова монтажна область…
+ New Group… Нова група…
+ Prevent Auto-Nesting Заборонити автоматичне вкладення
+ Show Layers Показати шари
+ Thumbnail Contents Вміст мініатюр
+ Thumbnail Size Розмір мініатюр
+ Use Default Masks on Fill Layers Використовувати типові маски для шарів заливки
+ Expand New Effects Розгортати нові ефекти
+ Add “copy” to Copied Layers and Groups Додавати «копія» до скопійованих шарів і груп
+ Preview on canvas when reordering layers Попередній перегляд на полотні під час зміни порядку шарів
+ Show layer mask badges Показувати позначки масок шарів
++
+# Smart Filter editors
+ Blending Options ({filter}) Параметри накладання ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) Приховати ефекти шару та смарт-фільтри ({key}-клік: усі шари)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) Показати ефекти шару та смарт-фільтри ({key}-клік: усі шари)
+ Wait for the current job to finish. Дочекайтеся завершення поточного завдання.
+ The document or Smart Filter changed. Reopen its dialog. Документ або смарт-фільтр змінився. Відкрийте його діалог знову.
+ Opacity must be between 0% and 100%. Непрозорість має бути від 0% до 100%.
+ Dissolve is approximated: it blends without Photoshop's dither. Розчинення наближене: змішування без дизерингу Photoshop.
Loading fonts… Завантаження шрифтів…
Response curve Крива відгуку
Simulate Pressure Імітувати натиск
diff --cc crates/ui-egui/src/i18n/vi.tsv
index 725f6a063,e5df67bdc..71aa59cfc
--- a/crates/ui-egui/src/i18n/vi.tsv
+++ b/crates/ui-egui/src/i18n/vi.tsv
@@@ -3724,13 -3724,23 +3724,31 @@@ curves Smooth Làm mượ
Ellipse Elip
# Layers panel options and Smart Filter editors
+ Add “copy” to Copied Layers and Groups Thêm “bản sao” vào lớp và nhóm được sao chép
+ Animation Options Tùy chọn hoạt ảnh
+ Entire Document Toàn bộ tài liệu
+ Expand New Effects Mở rộng hiệu ứng mới
+ Filter Options Tùy chọn bộ lọc
+ Layer Bounds Đường biên lớp
+ Layers Panel Options Tùy chọn bảng Lớp
+ New Artboard… Bảng vẽ mới…
+ New Group… Nhóm mới…
+ Panel Options… Tùy chọn bảng…
+ Prevent Auto-Nesting Chặn tự lồng
+ Preview on canvas when reordering layers Xem trước trên Canvas khi sắp xếp lại lớp
+ Show Layers Hiện các lớp
+ Show layer mask badges Hiện huy hiệu mặt nạ lớp
+ Thumbnail Contents Nội dung hình thu nhỏ
+ Thumbnail Size Kích thước hình thu nhỏ
+ Use Default Masks on Fill Layers Dùng mặt nạ mặc định cho lớp tô
++
+ Blending Options ({filter}) Tùy chọn hòa trộn ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) Ẩn hiệu ứng và bộ lọc thông minh của lớp ({key}-bấm: tất cả các lớp)
+ Opacity must be between 0% and 100%. Độ mờ phải nằm trong khoảng từ 0% đến 100%.
+ Dissolve is approximated: it blends without Photoshop's dither. Hoà tan chỉ được mô phỏng gần đúng: hòa trộn không có dither của Photoshop.
+ Show the layer's effects and Smart Filters ({key}-click: all layers) Hiện hiệu ứng và bộ lọc thông minh của lớp ({key}-bấm: tất cả các lớp)
+ The document or Smart Filter changed. Reopen its dialog. Tài liệu hoặc bộ lọc thông minh đã thay đổi. Hãy mở lại hộp thoại của nó.
+ Wait for the current job to finish. Hãy chờ tác vụ hiện tại hoàn tất.
Accept and Go to Conflict Chấp nhận và đến xung đột
Changes undone. Đã hoàn tác thay đổi.
Choose a new shortcut for this command, or leave it without one. Chọn phím tắt mới cho lệnh này, hoặc để lệnh không có phím tắt.
diff --cc crates/ui-egui/src/i18n/zh-hans.tsv
index 8307135b4,1a7d9bf44..fdba2eb8a
--- a/crates/ui-egui/src/i18n/zh-hans.tsv
+++ b/crates/ui-egui/src/i18n/zh-hans.tsv
@@@ -2675,14 -2675,26 +2675,35 @@@ cameraData Lens 镜�
Duplicate Layer 复制图层
Contract 收缩
+ Animation Options 动画选项
+ Entire Document 整个文档
+ Filter Options 过滤选项
+ Layer Bounds 图层边界
+ Layers Panel Options 图层面板选项
+ Lock Layers 锁定图层
+ New Artboard… 新建画板…
+ New Group 新建组
+ New Group… 新建组…
+ New Layer… 新建图层…
+ Panel Options… 面板选项…
+ Prevent Auto-Nesting 防止自动嵌套
+ Show Layers 显示图层
+ Thumbnail Contents 缩略图内容
+ Thumbnail Size 缩略图大小
+ Use Default Masks on Fill Layers 在填充图层上使用默认蒙版
+ Expand New Effects 展开新效果
+ Add “copy” to Copied Layers and Groups 为复制的图层和组添加“副本”
+ Preview on canvas when reordering layers 重新排列图层时在画布上预览
+ Show layer mask badges 显示图层蒙版标记
++
+# Smart Filter editors
+ Blending Options ({filter}) 混合选项 ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) 隐藏图层效果和智能滤镜 ({key} 单击:所有图层)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) 显示图层效果和智能滤镜 ({key} 单击:所有图层)
+ Wait for the current job to finish. 请等待当前任务完成。
+ The document or Smart Filter changed. Reopen its dialog. 文档或智能滤镜已更改。请重新打开其对话框。
+ Opacity must be between 0% and 100%. 不透明度必须介于 0% 和 100% 之间。
+ Dissolve is approximated: it blends without Photoshop's dither. “溶解”为近似效果:混合时没有 Photoshop 的抖动。
Loading fonts… 正在加载字体…
Response curve 响应曲线
Tool 工具
diff --cc crates/ui-egui/src/i18n/zh-hant.tsv
index a533c02f6,9edfd0979..9fd2a6d1e
--- a/crates/ui-egui/src/i18n/zh-hant.tsv
+++ b/crates/ui-egui/src/i18n/zh-hant.tsv
@@@ -2645,14 -2645,26 +2645,35 @@@ cameraData Lens 鏡�
Duplicate Layer 複製圖層
Contract 縮減
+ Animation Options 動畫選項
+ Entire Document 整份文件
+ Filter Options 篩選選項
+ Layer Bounds 圖層邊界
+ Layers Panel Options 圖層面板選項
+ Lock Layers 鎖定圖層
+ New Artboard… 新增工作區域…
+ New Group 新增群組
+ New Group… 新增群組…
+ New Layer… 新增圖層…
+ Panel Options… 面板選項…
+ Prevent Auto-Nesting 防止自動巢狀
+ Show Layers 顯示圖層
+ Thumbnail Contents 縮圖內容
+ Thumbnail Size 縮圖大小
+ Use Default Masks on Fill Layers 在填色圖層使用預設遮色片
+ Expand New Effects 展開新效果
+ Add “copy” to Copied Layers and Groups 為複製的圖層和群組加上「副本」
+ Preview on canvas when reordering layers 重新排列圖層時在畫布上預覽
+ Show layer mask badges 顯示圖層遮色片標記
++
+# Smart Filter editors
+ Blending Options ({filter}) 混合選項 ({filter})
+ Hide the layer's effects and Smart Filters ({key}-click: all layers) 隱藏圖層效果和智慧型濾鏡 ({key} 點擊:所有圖層)
+ Show the layer's effects and Smart Filters ({key}-click: all layers) 顯示圖層效果和智慧型濾鏡 ({key} 點擊:所有圖層)
+ Wait for the current job to finish. 請等待目前的工作完成。
+ The document or Smart Filter changed. Reopen its dialog. 文件或智慧型濾鏡已變更。請重新開啟其對話框。
+ Opacity must be between 0% and 100%. 不透明度必須介於 0% 和 100% 之間。
+ Dissolve is approximated: it blends without Photoshop's dither. 「溶解」為近似效果:混合時沒有 Photoshop 的仿色。
Loading fonts… 正在載入字體…
Response curve 回應曲線
Tool 工具
diff --cc crates/ui-egui/src/smart_ui.rs
index 65dbc45b7,7a7f8705e..d7136dfd7
--- a/crates/ui-egui/src/smart_ui.rs
+++ b/crates/ui-egui/src/smart_ui.rs
@@@ -70,36 -71,39 +71,48 @@@ pub(crate) fn filter_label(f: &photocra
.map_or_else(|| command.rsplit('.').next().unwrap_or(command).to_string(), |c| tl!(c.label).trim_end_matches('…').to_string())
}
+ /// Height of a Smart Filter or effect sub-row. As in Photoshop, these stay compact at every
+ /// Layers panel thumbnail size; only the layer row itself grows with its thumbnails.
+ pub(crate) const SUB_ROW_H: f32 = 22.0;
+
+ /// The Smart Filters header row: (row height, shared-mask thumbnail side). The mask follows the
+ /// Layers panel thumbnail size (hidden at None) and the row grows just enough to hold it.
+ pub(crate) fn smart_filters_header_geometry(size: LayerThumbnailSize, pro: bool) -> (f32, f32) {
+ let (thumb, _) = crate::layers_panel_ui::thumbnail_geometry(size, pro);
+ if thumb == 0.0 { (SUB_ROW_H, 0.0) } else { ((thumb + 6.0).max(SUB_ROW_H), thumb) }
+ }
+
/// Smart Filters header + one row per filter (top filter first, as in Photoshop) under a smart
/// layer. Edits are queued in `actions` as engine commands.
-pub fn filter_rows(app: &mut PhotocraftApp, ui: &mut egui::Ui, l: &Layer, depth: usize, actions: &mut Vec<(String, Value)>) {
+pub fn has_filters(l: &Layer) -> bool {
+ matches!(&l.content, LayerContent::Smart(sm) if !sm.smart_filters.is_empty())
+}
+
+/// The two rings in the layer row indicate an attached Smart Filters stack.
+pub fn paint_badge(painter: &egui::Painter, center: egui::Pos2, color: Color32) {
+ for dx in [-2.5, 2.5] {
+ painter.circle_stroke(center + vec2(dx, 0.0), 3.5, Stroke::new(1.0, color));
+ }
+}
+
+/// Paint the Smart Filters header and one row per filter of Smart Object `l` (top filter first), with their drag, drop and click handling; actions go to `actions`.
+pub fn filter_rows(app: &mut PhotocraftApp, ui: &mut egui::Ui, doc: &Document, l: &Layer, depth: usize, actions: &mut Vec<(String, Value)>) {
let LayerContent::Smart(sm) = &l.content else { return };
if sm.smart_filters.is_empty() {
return;
}
let t = Tokens::get(ui.ctx());
+ let (header_height, mask_size) = smart_filters_header_geometry(app.ui.layers_panel_options.thumbnail_size, t.pro);
- let indent = 30.0 + depth as f32 * 14.0 + 34.0;
+ let indent = 30.0 + crate::layer_row_ui::indent(depth, ui.available_width(), 130.0);
let Some(st) = app.session.active() else { return };
- let (active, doc) = (st.active_layer == Some(l.id), st.doc.id);
- let picked = ui.ctx().data(|d| d.get_temp::<FilterDrag>(selected_key(doc)));
+ let active = st.active_layer == Some(l.id);
+ let picked = ui.ctx().data(|d| d.get_temp::<FilterDrag>(selected_key(doc.id)));
let rows = std::iter::once(None).chain((0..sm.smart_filters.len()).rev().map(Some));
for index in rows {
- let (rect, resp) = ui.allocate_exact_size(vec2(ui.available_width(), if index.is_none() { 30.0 } else { 22.0 }), Sense::click_and_drag());
+ let (rect, resp) = ui.allocate_exact_size(vec2(ui.available_width(), if index.is_none() { header_height } else { SUB_ROW_H }), Sense::click_and_drag());
- if resp.drag_started() {
- ui.ctx().data_mut(|d| d.insert_temp::<FilterDrag>(drag_key(), (l.id.0, index)));
- }
if let Some((to, action)) = reorder_drop(ui, l, sm.smart_filters.len(), index, rect) {
// The moved filter ends up selected, with its smart object active, as after a click.
- ui.ctx().data_mut(|d| d.insert_temp::<FilterDrag>(selected_key(doc), (l.id.0, Some(to))));
+ ui.ctx().data_mut(|d| d.insert_temp::<FilterDrag>(selected_key(doc.id), (l.id.0, Some(to))));
actions.push(action);
if !active {
actions.push(("layer.select".into(), json!({"layer": l.id.0})));
@@@ -135,28 -138,20 +148,35 @@@
Some(i) => ("layer.smartFilter.setVisible".into(), json!({"layer": l.id.0, "index": i})),
});
}
- let x = rect.left() + indent + 60.0;
- if index.is_none() {
- let sw = Rect::from_center_size(pos2(x - 20.0, rect.center().y), vec2(24.0, 24.0));
- let x = rect.left() + indent + if index.is_none() { 0.0 } else { 16.0 };
++ // The shared mask scales with the thumbnail setting (hidden at None); the header name
++ // follows it, while filter names stay aligned past their eyes.
++ let mask_left = rect.left() + indent + 28.0;
++ let x = match index {
++ None if mask_size > 0.0 => mask_left + mask_size + 8.0,
++ None => mask_left,
++ Some(_) => rect.left() + indent + 60.0,
++ };
+ if index.is_none() && mask_size > 0.0 {
- // The Smart Filters mask scales along with the thumbnail size, not
- // independently of the selected Layers panel display preference.
- let sw = Rect::from_center_size(pos2(x + mask_size / 2.0, rect.center().y), vec2(mask_size, mask_size));
- ui.painter().rect_filled(sw, 1.0, if sm.filter_mask.as_ref().is_some_and(|m| m.enabled) { Color32::from_gray(200) } else { Color32::WHITE });
++ let sw = Rect::from_min_size(pos2(mask_left, rect.center().y - mask_size / 2.0), vec2(mask_size, mask_size));
+ if let Some(mask) = &sm.filter_mask {
+ let tex = app.mask_thumb_kind(ui.ctx(), doc, l.id, mask, crate::mask_thumbs_ui::THUMB_SMART_MASK);
+ ui.painter().image(tex, sw, Rect::from_min_max(pos2(0.0, 0.0), pos2(1.0, 1.0)), Color32::WHITE);
+ if !mask.enabled {
+ ui.painter().line_segment([sw.left_top(), sw.right_bottom()], Stroke::new(1.0, t.danger));
+ ui.painter().line_segment([sw.right_top(), sw.left_bottom()], Stroke::new(1.0, t.danger));
+ }
+ } else {
+ ui.painter().rect_filled(sw, 0.0, Color32::WHITE);
+ }
ui.painter().rect_stroke(sw, 1.0, Stroke::new(1.0, t.field_border), egui::StrokeKind::Inside);
}
- let text_x = if index.is_none() && mask_size > 0.0 { x + mask_size + 7.0 } else { x };
+ let blend = index.map(|_| Rect::from_center_size(pos2(rect.right() - crate::layer_row_ui::RIGHT_PAD - 9.0, rect.center().y), vec2(18.0, 18.0)));
+ let right = blend.map_or(rect.right() - crate::layer_row_ui::RIGHT_PAD, |r| r.left() - 4.0);
crate::layer_row_ui::label(
ui.painter(),
- text_x,
+ x,
rect.center().y,
- rect.right() - crate::layer_row_ui::RIGHT_PAD,
+ right,
&name,
egui::FontId::proportional(11.5),
if on { t.text_dim } else { t.text_faint },
@@@ -404,8 -370,47 +424,49 @@@ pub fn confirm_command(app: &Photocraft
}
#[cfg(test)]
+mod editor_tests;
+
+ mod layer_thumbnail_scaling_tests {
+ use super::*;
+ use egui_kittest::{Harness, kittest::Queryable};
+
+ #[test]
+ fn sub_rows_stay_compact_while_the_smart_filter_mask_follows_thumbnail_setting() {
+ for setting in [LayerThumbnailSize::None, LayerThumbnailSize::Small, LayerThumbnailSize::Medium, LayerThumbnailSize::Large] {
+ let mut session = photocraft_engine::Session::new();
+ session.execute("file.new", json!({"width": 50, "height": 38})).unwrap();
+ session.execute("edit.fill", json!({"color": "#8A42B3"})).unwrap();
+ session.execute("layer.smartObjects.convertToSmartObject", json!({})).unwrap();
+ session.execute("filter.blur.gaussianBlur", json!({"radius": 3})).unwrap();
+ session.execute("filter.sharpen.unsharpMask", json!({"amount": 80, "radius": 1, "threshold": 0})).unwrap();
+ session.execute("layer.layerStyle.dropShadow", json!({"size": 2})).unwrap();
+ assert!(matches!(session.active().unwrap().doc.layers.last().unwrap().content, LayerContent::Smart(_)));
+ let mut h = Harness::builder().with_size(vec2(1440.0, 1400.0)).with_max_steps(64).build_eframe(move |cc| {
+ PhotocraftApp::setup_context(&cc.egui_ctx, Default::default());
+ PhotocraftApp::new(session, crate::Services::default())
+ });
+ h.state_mut().ui.layers_panel_options.thumbnail_size = setting;
+ h.run_steps(8);
+ // Filter and effect rows keep Photoshop's compact height at every thumbnail size.
+ for label in ["Gaussian Blur", "Unsharp Mask", "Effects", "Drop Shadow"] {
+ let rect = h.get_by_label(label).rect();
+ assert!((rect.height() - SUB_ROW_H).abs() < 1.0, "{setting:?}: {label} was {rect:?}, expected {SUB_ROW_H}");
+ }
+ // Only the Smart Filters header grows, just enough for its shared-mask thumbnail.
+ let (header, mask) = smart_filters_header_geometry(setting, true);
+ let rect = h.get_by_label("Smart Filters").rect();
+ assert!((rect.height() - header).abs() < 1.0, "{setting:?}: Smart Filters was {rect:?}, expected {header}");
+ assert!(mask <= header - 6.0 || mask == 0.0, "{setting:?}: a {mask} mask must fit a {header} row");
+ assert_eq!(mask == 0.0, setting == LayerThumbnailSize::None, "{setting:?}: the mask hides only at None");
+ if let Some(dir) = std::env::var_os("PHOTOCRAFT_LAYERS_SNAPSHOTS") {
+ let dir = std::path::PathBuf::from(dir);
+ std::fs::create_dir_all(&dir).unwrap();
+ h.render().unwrap().save(dir.join(format!("layers-sub-rows-{setting:?}.png"))).unwrap();
+ }
+ }
+ }
+ }
+
#[cfg(test)]
mod tests {
use super::*;