From 49290fa8e6bd32b1f841718a28e73a7f2b6ebdd1 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 30 Oct 2026 06:32:34 -0700 Subject: [PATCH 1/9] Brushes: Delete Brush asks first, and Alt-click deletes without asking The Brushes panel's Delete Brush button and its panel menu item now ask before deleting the selected brushes, as Swatches and Graphic Styles do. OK deletes them in one undo step and strokes that used them become plain strokes; Cancel leaves the document unchanged. Alt-click (Option-click on macOS) on the button deletes without asking. The brush.delete command still deletes at once. --- crates/ui-egui/src/i18n/bg.tsv | 3 + crates/ui-egui/src/i18n/ca.tsv | 3 + crates/ui-egui/src/i18n/cs.tsv | 3 + crates/ui-egui/src/i18n/da.tsv | 3 + crates/ui-egui/src/i18n/de.tsv | 3 + crates/ui-egui/src/i18n/el.tsv | 3 + crates/ui-egui/src/i18n/es.tsv | 3 + crates/ui-egui/src/i18n/fi.tsv | 3 + crates/ui-egui/src/i18n/fr.tsv | 3 + crates/ui-egui/src/i18n/hu.tsv | 3 + crates/ui-egui/src/i18n/id.tsv | 3 + crates/ui-egui/src/i18n/it.tsv | 3 + crates/ui-egui/src/i18n/ja.tsv | 3 + crates/ui-egui/src/i18n/ka.tsv | 3 + crates/ui-egui/src/i18n/ko.tsv | 3 + crates/ui-egui/src/i18n/nl.tsv | 3 + crates/ui-egui/src/i18n/pl.tsv | 3 + crates/ui-egui/src/i18n/pt-br.tsv | 3 + crates/ui-egui/src/i18n/ru.tsv | 3 + crates/ui-egui/src/i18n/sv.tsv | 3 + crates/ui-egui/src/i18n/tr.tsv | 3 + crates/ui-egui/src/i18n/uk.tsv | 3 + crates/ui-egui/src/i18n/vi.tsv | 3 + crates/ui-egui/src/i18n/zh-hans.tsv | 3 + crates/ui-egui/src/i18n/zh-hant.tsv | 3 + crates/ui-egui/src/panels/brushes.rs | 21 +++++- crates/ui-egui/src/panels/brushes/tests.rs | 83 ++++++++++++++++++++-- docs/target-app-parity.md | 1 + 28 files changed, 171 insertions(+), 9 deletions(-) diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index dabb1c8e9..702fb78d2 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -742,6 +742,9 @@ font-technology Variable Променливи Yes Да No Не Delete Tab Изтриване на табулация + Delete the brush “{name}”? Да се изтрие четката „{name}“? + Delete these {count} brushes? Да се изтрият тези {count} четки? + Strokes using deleted brushes become plain strokes. Щрихите, които използват изтритите четки, стават обикновени щрихи. Delete the graphic style “{name}”? Изтриване на графичния стил „{name}“? Delete Theme Изтриване на тема Delete theme Изтриване на тема diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 59984a519..4269d2b7e 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -1059,6 +1059,9 @@ Yes Sí No No Delete Tab Suprimeix la tabulació + Delete the brush “{name}”? Voleu suprimir el pinzell “{name}”? + Delete these {count} brushes? Voleu suprimir aquests {count} pinzells? + Strokes using deleted brushes become plain strokes. Els traços que utilitzen pinzells suprimits esdevenen traços normals. Delete the graphic style “{name}”? Voleu suprimir l’estil gràfic “{name}”? Delete the library “{name}”? Voleu suprimir la biblioteca “{name}”? Delete Theme Suprimeix el tema diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 11d38443b..39c5e2be1 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -1558,6 +1558,9 @@ lighting Light Světlo Reverse Gradient Obrátit přechod Save to Swatches Uložit do vzorníku Delete Graphic Style (Alt-click: without asking) Odstranit grafický styl (Alt+kliknutí: bez dotazu) + Delete the brush “{name}”? Odstranit štětec „{name}“? + Delete these {count} brushes? Odstranit těchto {count} štětců? + Strokes using deleted brushes become plain strokes. Tahy používající odstraněné štětce se změní na běžné tahy. Delete the graphic style “{name}”? Odstranit grafický styl „{name}“? Delete these {n} graphic styles? Odstranit tyto grafické styly ({n})? Delete this {n} graphic style? Odstranit tento grafický styl ({n})? diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 1203b3d36..f7021936c 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -1472,6 +1472,9 @@ lighting Light Lys Reverse Gradient Omvend gradient Save to Swatches Gem i farveprøver Delete Graphic Style (Alt-click: without asking) Slet grafisk typografi (Alt-klik: uden at spørge) + Delete the brush “{name}”? Slet penslen »{name}«? + Delete these {count} brushes? Slet disse {count} pensler? + Strokes using deleted brushes become plain strokes. Streger, der bruger slettede pensler, bliver almindelige streger. Delete the graphic style “{name}”? Slet den grafiske typografi »{name}«? Delete these {n} graphic styles? Slet disse {n} grafiske typografier? Delete this {n} graphic style? Slet denne {n} grafiske typografi? diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index e832311b0..dc9c67f8b 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -736,6 +736,9 @@ font-technology Variable Variabel Yes Ja No Nein Delete Tab Tabulator löschen + Delete the brush “{name}”? Pinsel „{name}“ löschen? + Delete these {count} brushes? Diese {count} Pinsel löschen? + Strokes using deleted brushes become plain strokes. Konturen mit gelöschten Pinseln werden zu einfachen Konturen. Delete the graphic style “{name}”? Grafikstil „{name}“ löschen? Delete Theme Thema löschen Delete theme Thema löschen diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 90709397a..150002aa4 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -716,6 +716,9 @@ font-technology Variable Μεταβλητές Yes Ναι No Όχι Delete Tab Διαγραφή στηλοθέτη + Delete the brush “{name}”? Να διαγραφεί το πινέλο «{name}»; + Delete these {count} brushes? Να διαγραφούν αυτά τα {count} πινέλα; + Strokes using deleted brushes become plain strokes. Οι πινελιές που χρησιμοποιούν διαγραμμένα πινέλα γίνονται απλές πινελιές. Delete the graphic style “{name}”? Να διαγραφεί το στυλ γραφικών «{name}»; Delete Theme Διαγραφή θέματος Delete theme Διαγραφή θέματος diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index f90a4b047..2bbb31702 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -757,6 +757,9 @@ font-technology Variable Variables Yes Sí No No Delete Tab Eliminar tabulación + Delete the brush “{name}”? ¿Eliminar el pincel “{name}”? + Delete these {count} brushes? ¿Eliminar estos {count} pinceles? + Strokes using deleted brushes become plain strokes. Los trazos que usan pinceles eliminados se convierten en trazos simples. Delete the graphic style “{name}”? ¿Eliminar el estilo gráfico “{name}”? Delete Theme Eliminar tema Delete theme Eliminar tema diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 8c4bc1fc1..1a276e0e7 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -1532,6 +1532,9 @@ lighting Light Valo Reverse Gradient Käännä liukuväri Save to Swatches Tallenna värimalleihin Delete Graphic Style (Alt-click: without asking) Poista grafiikkatyyli (Alt-napsautus: kysymättä) + Delete the brush “{name}”? Poistetaanko sivellin ”{name}”? + Delete these {count} brushes? Poistetaanko nämä {count} sivellintä? + Strokes using deleted brushes become plain strokes. Poistettuja siveltimiä käyttävät viivat muuttuvat tavallisiksi viivoiksi. Delete the graphic style “{name}”? Poistetaanko grafiikkatyyli ”{name}”? Delete these {n} graphic styles? Poistetaanko nämä {n} grafiikkatyyliä? Delete this {n} graphic style? Poistetaanko tämä {n} grafiikkatyyli? diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 7db8ee535..68a78da7d 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -759,6 +759,9 @@ font-technology Variable Variables Yes Oui No Non Delete Tab Supprimer la tabulation + Delete the brush “{name}”? Supprimer la forme « {name} » ? + Delete these {count} brushes? Supprimer ces {count} formes ? + Strokes using deleted brushes become plain strokes. Les contours utilisant des formes supprimées deviennent des contours simples. Delete the graphic style “{name}”? Supprimer le style graphique « {name} » ? Delete Theme Supprimer le thème Delete theme Supprimer le thème diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 0aceab5ab..322770fb8 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -981,6 +981,9 @@ font-technology Variable Változó Yes Igen No Nem Delete Tab Tabulátor törlése + Delete the brush “{name}”? Törlöd ezt az ecsetet: „{name}”? + Delete these {count} brushes? Törlöd ezt a {count} ecsetet? + Strokes using deleted brushes become plain strokes. A törölt ecseteket használó körvonalak egyszerű körvonalakká válnak. Delete the graphic style “{name}”? Törlöd ezt a grafikai stílust: „{name}”? Delete the library “{name}”? Törlöd ezt a könyvtárat: „{name}”? Delete Theme Téma törlése diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 95a303633..25ee0213a 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -1472,6 +1472,9 @@ lighting Light Cahaya Reverse Gradient Balikkan gradien Save to Swatches Simpan ke swatch Delete Graphic Style (Alt-click: without asking) Hapus gaya grafis (Alt+klik: tanpa konfirmasi) + Delete the brush “{name}”? Hapus kuas “{name}”? + Delete these {count} brushes? Hapus {count} kuas ini? + Strokes using deleted brushes become plain strokes. Goresan yang menggunakan kuas terhapus menjadi goresan biasa. Delete the graphic style “{name}”? Hapus gaya grafis “{name}”? Delete these {n} graphic styles? Hapus {n} gaya grafis ini? Delete this {n} graphic style? Hapus {n} gaya grafis ini? diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index a9c16d3ba..7685ad98a 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -757,6 +757,9 @@ font-technology Variable Variabili Yes Sì No No Delete Tab Elimina tabulazione + Delete the brush “{name}”? Eliminare il pennello “{name}”? + Delete these {count} brushes? Eliminare questi {count} pennelli? + Strokes using deleted brushes become plain strokes. I tracciati che usano pennelli eliminati diventano tracciati semplici. Delete the graphic style “{name}”? Eliminare lo stile grafico “{name}”? Delete Theme Elimina tema Delete theme Elimina tema diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 01c25917b..99376a0f1 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -1308,6 +1308,9 @@ font-technology Variable バリアブル Delete Transparency Flattener Preset 透明の分割・統合プリセットを削除 Delete Width Point 幅ポイントを削除 Delete Workspace ワークスペースを削除 + Delete the brush “{name}”? ブラシ「{name}」を削除しますか? + Delete these {count} brushes? これら {count} 個のブラシを削除しますか? + Strokes using deleted brushes become plain strokes. 削除したブラシを使用する線は通常の線になります。 Delete the graphic style “{name}”? グラフィックスタイル「{name}」を削除しますか? Delete theme テーマを削除 Delete this saved preset この保存済みプリセットを削除 diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index e0e1a1095..b55b3f2c9 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -1389,6 +1389,9 @@ lighting Light სინათლე Reverse Gradient გრადიენტის შებრუნება Save to Swatches ფერის ნიმუშებში შენახვა Delete Graphic Style (Alt-click: without asking) გრაფიკული სტილის წაშლა (Alt-დაწკაპუნებით: დაუკითხავად) + Delete the brush “{name}”? წაიშალოს ფუნჯი „{name}“? + Delete these {count} brushes? წაიშალოს ეს {count} ფუნჯი? + Strokes using deleted brushes become plain strokes. წაშლილი ფუნჯებით დახატული შტრიხები ჩვეულებრივ შტრიხებად იქცევა. Delete the graphic style “{name}”? წაიშალოს გრაფიკული სტილი „{name}“? Delete these {n} graphic styles? წაიშალოს ეს გრაფიკული სტილები ({n})? Delete this {n} graphic style? წაიშალოს ეს გრაფიკული სტილი ({n})? diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 45ce73252..e5dee07ee 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -1299,6 +1299,9 @@ font-technology Variable 가변 Delete Transparency Flattener Preset 투명도 병합 프리셋 삭제 Delete Width Point 너비 포인트 삭제 Delete Workspace 작업 영역 삭제 + Delete the brush “{name}”? 브러시 “{name}”을(를) 삭제하시겠습니까? + Delete these {count} brushes? 이 브러시 {count}개를 삭제하시겠습니까? + Strokes using deleted brushes become plain strokes. 삭제된 브러시를 사용한 선은 일반 선이 됩니다. Delete the graphic style “{name}”? 그래픽 스타일 “{name}”을(를) 삭제하시겠습니까? Delete theme 테마 삭제 Delete this saved preset 저장된 이 프리셋 삭제 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index e4cca253f..bbee0d063 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -1486,6 +1486,9 @@ lighting Light Licht Reverse Gradient Verloop omkeren Save to Swatches Opslaan in stalen Delete Graphic Style (Alt-click: without asking) Grafische stijl verwijderen (Alt-klik: zonder vragen) + Delete the brush “{name}”? Kwast „{name}” verwijderen? + Delete these {count} brushes? Deze {count} kwasten verwijderen? + Strokes using deleted brushes become plain strokes. Lijnen die verwijderde kwasten gebruiken, worden gewone lijnen. Delete the graphic style “{name}”? De grafische stijl „{name}” verwijderen? Delete these {n} graphic styles? Deze {n} grafische stijlen verwijderen? Delete this {n} graphic style? Deze {n} grafische stijl verwijderen? diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 027f7198e..95d62b9a0 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -1472,6 +1472,9 @@ lighting Light Światło Reverse Gradient Odwróć gradient Save to Swatches Zapisz w próbkach Delete Graphic Style (Alt-click: without asking) Usuń styl graficzny (kliknięcie z Alt: bez pytania) + Delete the brush “{name}”? Usunąć pędzel „{name}”? + Delete these {count} brushes? Usunąć te {count} pędzle? + Strokes using deleted brushes become plain strokes. Obrysy używające usuniętych pędzli stają się zwykłymi obrysami. Delete the graphic style “{name}”? Usunąć styl graficzny „{name}”? Delete these {n} graphic styles? Usunąć te style graficzne ({n})? Delete this {n} graphic style? Usunąć ten styl graficzny ({n})? diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index e9ee07994..7f4d8287a 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -674,6 +674,9 @@ Delete Transparency Flattener Preset Excluir Predefinido de Achatamento de Transparência Delete Width Point Excluir Ponto de Largura Delete Workspace Excluir Espaço de Trabalho + Delete the brush “{name}”? Excluir o pincel “{name}”? + Delete these {count} brushes? Excluir estes {count} pincéis? + Strokes using deleted brushes become plain strokes. Traços que usam pincéis excluídos tornam-se traços simples. Delete the graphic style “{name}”? Excluir o estilo gráfico “{name}”? Delete theme Excluir tema Delete this saved preset Excluir este predefinido salvo diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index dea1bee84..583a3f09a 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -755,6 +755,9 @@ font-technology Variable Вариативные Yes Да No Нет Delete Tab Удалить табуляцию + Delete the brush “{name}”? Удалить кисть «{name}»? + Delete these {count} brushes? Удалить эти кисти ({count})? + Strokes using deleted brushes become plain strokes. Обводки, использующие удалённые кисти, становятся обычными обводками. Delete the graphic style “{name}”? Удалить графический стиль «{name}»? Delete Theme Удалить тему Delete theme Удалить тему diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index fcd0427a7..1b6882662 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -744,6 +744,9 @@ font-technology Variable Variabla Yes Ja No Nej Delete Tab Radera tabb + Delete the brush “{name}”? Radera penseln ”{name}”? + Delete these {count} brushes? Radera dessa {count} penslar? + Strokes using deleted brushes become plain strokes. Linjer som använder borttagna penslar blir vanliga linjer. Delete the graphic style “{name}”? Radera grafikstilen ”{name}”? Delete Theme Radera tema Delete theme Radera tema diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 7a1ea3647..d318f8a75 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -736,6 +736,9 @@ font-technology Variable Değişken Yes Evet No Hayır Delete Tab Sekmeyi Sil + Delete the brush “{name}”? “{name}” fırçası silinsin mi? + Delete these {count} brushes? Bu {count} fırça silinsin mi? + Strokes using deleted brushes become plain strokes. Silinen fırçaları kullanan konturlar düz konturlara dönüşür. Delete the graphic style “{name}”? “{name}” grafik stili silinsin mi? Delete Theme Temayı Sil Delete theme Temayı sil diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 58693ddfd..5dd9b8979 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -751,6 +751,9 @@ font-technology Variable Варіативні Yes Так No Ні Delete Tab Видалити табуляцію + Delete the brush “{name}”? Видалити пензель «{name}»? + Delete these {count} brushes? Видалити ці пензлі ({count})? + Strokes using deleted brushes become plain strokes. Обведення, що використовують видалені пензлі, стають звичайними обведеннями. Delete the graphic style “{name}”? Видалити графічний стиль «{name}»? Delete Theme Видалити тему Delete theme Видалити тему diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index aaa74d0e7..6136b2ddd 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -877,6 +877,9 @@ font-technology Variable Biến thiên Yes Có No Không Delete Tab Xóa tab + Delete the brush “{name}”? Xóa cọ “{name}”? + Delete these {count} brushes? Xóa {count} cọ này? + Strokes using deleted brushes become plain strokes. Các nét dùng cọ đã xóa trở thành nét thông thường. Delete the graphic style “{name}”? Xóa kiểu đồ họa “{name}”? Delete the library “{name}”? Xóa thư viện “{name}”? Delete Theme Xóa bộ màu diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 71b1fead1..7fbdf119b 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -700,6 +700,9 @@ Yes 是 No 否 Delete Tab 删除制表位 + Delete the brush “{name}”? 要删除画笔“{name}”吗? + Delete these {count} brushes? 要删除这 {count} 个画笔吗? + Strokes using deleted brushes become plain strokes. 使用已删除画笔的描边会变成普通描边。 Delete the graphic style “{name}”? 要删除图形样式“{name}”吗? Delete Theme 删除主题 Delete theme 删除主题 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index a89fd28cc..3cb07c146 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -719,6 +719,9 @@ font-technology Variable 可變 Yes 是 No 否 Delete Tab 刪除定位點 + Delete the brush “{name}”? 要刪除筆刷「{name}」嗎? + Delete these {count} brushes? 要刪除這 {count} 個筆刷嗎? + Strokes using deleted brushes become plain strokes. 使用已刪除筆刷的筆畫會變成一般筆畫。 Delete the graphic style “{name}”? 要刪除繪圖樣式「{name}」嗎? Delete Theme 刪除主題 Delete theme 刪除主題 diff --git a/crates/ui-egui/src/panels/brushes.rs b/crates/ui-egui/src/panels/brushes.rs index cf95c5a9f..29acddf37 100644 --- a/crates/ui-egui/src/panels/brushes.rs +++ b/crates/ui-egui/src/panels/brushes.rs @@ -204,6 +204,23 @@ fn run_on(app: &mut VectorcraftApp, id: &str, names: &[String]) { app.run(id, p).ok(); } +/// Delete `names` after asking, or immediately when the bottom button was Alt-clicked. +fn delete(app: &mut VectorcraftApp, names: &[String], now: bool) { + let params = match names { + [name] => json!({ "name": name }), + _ => json!({ "names": names }), + }; + if now { + app.run("brush.delete", params).ok(); + return; + } + let message = match names { + [name] => crate::i18n::fmt(tl!("Delete the brush “{name}”?"), &[("name", name)]), + _ => crate::i18n::fmt(tl!("Delete these {count} brushes?"), &[("count", &names.len().to_string())]), + }; + crate::dialogs::confirm::ask(app, &message, tl!("Strokes using deleted brushes become plain strokes."), "brush.delete", params); +} + /// The names in `list` in the order the panel shows them: by type in [`KINDS`] order, without the /// hidden types. fn shown<'a>(list: &'a [(String, String)], hidden: &[String]) -> Vec<&'a str> { @@ -417,7 +434,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { app.status(e); } if widgets::icon_button_enabled(ui, "trash-2", tl!("Delete Brush"), false, !targets.is_empty(), 24.0).clicked() { - run_on(app, "brush.delete", &targets); + delete(app, &targets, ui.input(|i| i.modifiers.alt)); } }); } @@ -452,7 +469,7 @@ pub fn menu(app: &mut VectorcraftApp, ui: &mut Ui) { run_on(app, "brush.duplicate", &targets); } if menu_item(ui, tl!("Delete Brush"), !targets.is_empty(), false) { - run_on(app, "brush.delete", &targets); + delete(app, &targets, false); } if menu_item(ui, tl!("Remove Brush Stroke"), sel.is_some(), false) { app.run("brush.remove", json!({})).ok(); diff --git a/crates/ui-egui/src/panels/brushes/tests.rs b/crates/ui-egui/src/panels/brushes/tests.rs index 47fc962c6..711a60199 100644 --- a/crates/ui-egui/src/panels/brushes/tests.rs +++ b/crates/ui-egui/src/panels/brushes/tests.rs @@ -146,6 +146,23 @@ fn names(app: &mut VectorcraftApp) -> Vec { brushes(app).0.into_iter().map(|b| b.0).collect() } +fn undo_count(app: &VectorcraftApp) -> usize { + app.session.active().unwrap().history.undo.len() +} + +fn delete_button(ctx: &egui::Context, app: &mut VectorcraftApp, modifiers: egui::Modifiers, time: f64) { + let out = frame_with(ctx, app, vec![], egui::Modifiers::NONE, time, show); + let at = clickable(&out).into_iter().find(|(label, _)| label.as_deref() == Some("Delete Brush")).expect("Delete Brush button").1.center(); + click(ctx, app, at, modifiers, time + 0.5, show); +} + +fn assert_delete_dialog(app: &VectorcraftApp, message: &str) { + let d = app.ui.dialog.as_ref().expect("Delete Brush asks first"); + assert_eq!(d.kind, crate::dialogs::confirm::KIND); + assert_eq!(d.str("message"), message); + assert_eq!(d.str("detail"), "Strokes using deleted brushes become plain strokes."); +} + /// Click the panel menu's item `label` (frames at `time`, `time + 0.5`). fn menu_click(ctx: &egui::Context, app: &mut VectorcraftApp, label: &str, time: f64) { let out = frame_with(ctx, app, vec![], egui::Modifiers::NONE, time, menu); @@ -186,21 +203,23 @@ fn shift_and_command_clicks_select_brushes_for_delete_and_duplicate() { click(&ctx, &mut app, tiles[1].center(), egui::Modifiers::COMMAND, 3.0, show); let out = frame_with(&ctx, &mut app, vec![], egui::Modifiers::NONE, 3.5, show); assert_eq!(lit_tiles(&out), [0, 2]); - let undo = |app: &VectorcraftApp| app.session.active().unwrap().history.undo.len(); - let before = (names(&mut app), undo(&app)); + let before = (names(&mut app), undo_count(&app)); menu_click(&ctx, &mut app, "Duplicate Brush", 4.0); let copies = [format!("{} copy", three[0]), format!("{} copy", three[2])]; assert_eq!(names(&mut app)[before.0.len()..], copies); - assert_eq!(undo(&app), before.1 + 1); + assert_eq!(undo_count(&app), before.1 + 1); // The bottom bar's last button, Delete Brush. - let out = frame_with(&ctx, &mut app, vec![], egui::Modifiers::NONE, 5.0, show); - let trash = clickable(&out).last().unwrap().1.center(); - click(&ctx, &mut app, trash, egui::Modifiers::NONE, 6.0, show); + delete_button(&ctx, &mut app, egui::Modifiers::NONE, 5.0); + assert_delete_dialog(&app, "Delete these 2 brushes?"); + assert_eq!(names(&mut app), [before.0.clone(), copies.to_vec()].concat()); + assert_eq!(brush_of(&app, rect).as_deref(), Some(three[0].as_str())); + assert_eq!(undo_count(&app), before.1 + 1); + crate::dialogs::confirm(&mut app).unwrap(); let left = names(&mut app); assert!(!left.contains(&three[0]) && !left.contains(&three[2]) && left.contains(&three[1]), "{left:?}"); assert!(copies.iter().all(|c| left.contains(c)), "{left:?}"); assert_eq!(brush_of(&app, rect), None); - assert_eq!(undo(&app), before.1 + 2); + assert_eq!(undo_count(&app), before.1 + 2); } /// Selecting other art ends the multi-selection: selecting the first art again does not bring @@ -231,6 +250,9 @@ fn selecting_other_art_ends_the_brush_multi_selection() { let out = frame_with(&ctx, &mut app, vec![], egui::Modifiers::NONE, 4.0, show); assert_eq!(lit_tiles(&out), [1]); menu_click(&ctx, &mut app, "Delete Brush", 5.0); + assert_delete_dialog(&app, &format!("Delete the brush “{}”?", three[1])); + assert!(names(&mut app).contains(&three[1])); + crate::dialogs::confirm(&mut app).unwrap(); let left = names(&mut app); assert!(left.contains(&three[0]) && !left.contains(&three[1]) && left.contains(&three[2]), "{left:?}"); assert_eq!((brush_of(&app, a).as_deref(), brush_of(&app, c)), (Some(three[0].as_str()), None)); @@ -297,10 +319,57 @@ fn select_all_unused_selects_the_brushes_no_stroke_paints_with() { let on: Vec = (0..tiles.len()).filter(|i| lit(&ctx, &out).contains(&tiles[*i])).collect(); assert_eq!(on, (0..tiles.len()).filter(|i| *i != 1).collect::>()); menu_click(&ctx, &mut app, "Delete Brush", 3.0); + assert_delete_dialog(&app, &format!("Delete these {} brushes?", list.len() - 1)); + assert_eq!(names(&mut app).len(), list.len()); + crate::dialogs::confirm(&mut app).unwrap(); assert_eq!(names(&mut app), [list[1].0.clone()]); assert_eq!(brush_of(&app, a), Some(list[1].0.clone())); } +#[test] +fn delete_button_cancel_keeps_selected_brushes_strokes_and_history() { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 200, "height": 100})).unwrap(); + let rect = NodeId(app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 50, "height": 40})).unwrap()["id"].as_u64().unwrap()); + let ctx = egui::Context::default(); + ctx.enable_accesskit(); + let (three, _) = select_three(&ctx, &mut app, rect); + let before = (names(&mut app), brush_of(&app, rect), undo_count(&app)); + delete_button(&ctx, &mut app, egui::Modifiers::NONE, 3.0); + assert_delete_dialog(&app, "Delete these 3 brushes?"); + assert_eq!((names(&mut app), brush_of(&app, rect), undo_count(&app)), before); + crate::dialogs::cancel(&mut app); + assert!(app.ui.dialog.is_none()); + assert_eq!((names(&mut app), brush_of(&app, rect), undo_count(&app)), before); + assert_eq!(before.1.as_deref(), Some(three[0].as_str())); + app.run("brush.delete", json!({"name": three[0]})).unwrap(); + assert!(app.ui.dialog.is_none()); + assert_eq!(undo_count(&app), before.2 + 1); + app.run("brush.delete", json!({"names": [three[1], three[2]]})).unwrap(); + assert!(app.ui.dialog.is_none()); + assert_eq!(undo_count(&app), before.2 + 2); +} + +#[test] +fn alt_delete_button_removes_selected_brushes_without_dialog() { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 200, "height": 100})).unwrap(); + let rect = NodeId(app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 50, "height": 40})).unwrap()["id"].as_u64().unwrap()); + let ctx = egui::Context::default(); + ctx.enable_accesskit(); + let (three, _) = select_three(&ctx, &mut app, rect); + let before = undo_count(&app); + delete_button(&ctx, &mut app, egui::Modifiers::NONE, 3.0); + assert_delete_dialog(&app, "Delete these 3 brushes?"); + crate::dialogs::cancel(&mut app); + delete_button(&ctx, &mut app, egui::Modifiers::ALT, 4.0); + assert!(app.ui.dialog.is_none()); + let left = names(&mut app); + assert!(three.iter().all(|name| !left.contains(name))); + assert_eq!(brush_of(&app, rect), None); + assert_eq!(undo_count(&app), before + 1); +} + #[test] fn art_dropped_on_the_panel_becomes_an_art_brush_and_a_brush_drags_out() { let mut app = VectorcraftApp::new(Session::new(), Default::default()); diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 05985f9f1..ab9b96f4b 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -962,6 +962,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur Hue Shift set by `brush.new` or `brush.options` without a key color takes the color the art's fills and strokes use most, as Brush Options already offers it, following the Brushes page, where the key color defaults to the color that stands out most in the art (). The page does not state how prominence is measured. Counting the fills and strokes that use each solid color, with the first one found winning a tie and black for art with no solid color, is VectorCraft's own rule. A `brush.options` edit that gives only the method keeps the brush's key color, and one that gives only an art brush's start guide keeps its end guide. Evidence: `tests_brushsym::hue_shift_without_a_key_takes_the_most_used_art_color`, `tests_brushsym::art_brush_options_keep_the_scale_fields_an_edit_leaves_out`. Bristle Brush Options and `brush.new` take a bristle brush name of at most 31 characters, as the Brushes page states for the Bristle Brush Options. The Name field stops taking characters at 31, and `brush.new` and `brush.options` refuse a longer new name with an error that names the limit. The page does not say how the limit counts characters or what happens to longer names already saved; counting characters and the number added to a taken name, keeping longer saved names, and leaving `brush.duplicate` unlimited are VectorCraft's own rules. A bristle brush that a document or a saved file already holds under a longer name keeps it, and the other brush types take a name of any length. Test: `bristle_brush_names_have_at_most_31_characters` in `tests/brushsym.rs`. Public reference: [Brushes](https://web.archive.org/web/20241230205225/https://helpx.adobe.com/illustrator/using/brushes.html) (archived copy). In the Brushes panel, Shift-click selects a range of brushes and Ctrl/Cmd-click adds or removes one. Delete Brush and Duplicate Brush then act on all of them (`brush.delete {names}`, `brush.duplicate {names}`). + The bottom Delete Brush button and the panel menu ask before deleting; Alt-click (Option-click on macOS) on the button deletes without asking. Document Info has a Brushes category after Graphic Styles. It lists the Brushes panel's brushes, or with Selection Only it lists the brushes that the selected objects' strokes use. The Document Info report and Package's report list them too (`document.info {category: "brushes"}`, `brushNames`). Document Info has a Repeat Objects category after Embedded Images. It lists each radial, grid and mirror Repeat object by name with its kind and the number of instances it makes. For a grid it gives the rows and columns instead, followed by the number of instances it draws when that is fewer. With Selection Only it lists the Repeat objects in the selection. The Document Info report and Package's report list them too (`document.info {category: "repeats"}`, `repeatObjects`). The Brushes panel menu's Select All Unused selects the brushes that are not used in the document, as the [Brushes](https://web.archive.org/web/20241230205225/https://helpx.adobe.com/illustrator/using/brushes.html) page (archived copy) describes. A brush counts as used when a stroke paints with it in the art (opacity masks included), in symbols, graph designs, pattern tiles or graphic styles, or in the art of a used brush (`brush.unused`). From 90f9907de970c3dc8d6c66ddce35941e2e992751 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 30 Oct 2026 06:49:52 -0700 Subject: [PATCH 2/9] Brushes: Alt-click Delete Brush runs through the shared command helper --- crates/ui-egui/src/panels/brushes.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/panels/brushes.rs b/crates/ui-egui/src/panels/brushes.rs index 29acddf37..22b7d9401 100644 --- a/crates/ui-egui/src/panels/brushes.rs +++ b/crates/ui-egui/src/panels/brushes.rs @@ -206,14 +206,14 @@ fn run_on(app: &mut VectorcraftApp, id: &str, names: &[String]) { /// Delete `names` after asking, or immediately when the bottom button was Alt-clicked. fn delete(app: &mut VectorcraftApp, names: &[String], now: bool) { + if now { + run_on(app, "brush.delete", names); + return; + } let params = match names { [name] => json!({ "name": name }), _ => json!({ "names": names }), }; - if now { - app.run("brush.delete", params).ok(); - return; - } let message = match names { [name] => crate::i18n::fmt(tl!("Delete the brush “{name}”?"), &[("name", name)]), _ => crate::i18n::fmt(tl!("Delete these {count} brushes?"), &[("count", &names.len().to_string())]), From 79188b359387ff99743a0ec1ac37a1cc5bebdc90 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 30 Oct 2026 07:21:27 -0700 Subject: [PATCH 3/9] Brushes: the Delete Brush prompt for several brushes uses each language's plural forms The confirmation for several brushes now goes through i18n::tn, as the Graphic Styles prompt does, and each catalog gives the count-dependent forms in an @plural row. --- crates/ui-egui/src/i18n/bg.tsv | 2 +- crates/ui-egui/src/i18n/ca.tsv | 2 +- crates/ui-egui/src/i18n/cs.tsv | 2 +- crates/ui-egui/src/i18n/da.tsv | 2 +- crates/ui-egui/src/i18n/de.tsv | 2 +- crates/ui-egui/src/i18n/el.tsv | 2 +- crates/ui-egui/src/i18n/es.tsv | 2 +- crates/ui-egui/src/i18n/fi.tsv | 2 +- crates/ui-egui/src/i18n/fr.tsv | 2 +- crates/ui-egui/src/i18n/hu.tsv | 2 +- crates/ui-egui/src/i18n/id.tsv | 2 +- crates/ui-egui/src/i18n/it.tsv | 2 +- crates/ui-egui/src/i18n/ja.tsv | 2 +- crates/ui-egui/src/i18n/ka.tsv | 2 +- crates/ui-egui/src/i18n/ko.tsv | 2 +- crates/ui-egui/src/i18n/nl.tsv | 2 +- crates/ui-egui/src/i18n/pl.tsv | 2 +- crates/ui-egui/src/i18n/pt-br.tsv | 2 +- crates/ui-egui/src/i18n/ru.tsv | 2 +- crates/ui-egui/src/i18n/sv.tsv | 2 +- crates/ui-egui/src/i18n/tr.tsv | 2 +- crates/ui-egui/src/i18n/uk.tsv | 2 +- crates/ui-egui/src/i18n/vi.tsv | 2 +- crates/ui-egui/src/i18n/zh-hans.tsv | 2 +- crates/ui-egui/src/i18n/zh-hant.tsv | 2 +- crates/ui-egui/src/panels/brushes.rs | 2 +- crates/ui-egui/src/panels/brushes/tests.rs | 13 +++++++++++++ 27 files changed, 39 insertions(+), 26 deletions(-) diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index 702fb78d2..5a5efddad 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -743,7 +743,6 @@ font-technology Variable Променливи No Не Delete Tab Изтриване на табулация Delete the brush “{name}”? Да се изтрие четката „{name}“? - Delete these {count} brushes? Да се изтрият тези {count} четки? Strokes using deleted brushes become plain strokes. Щрихите, които използват изтритите четки, стават обикновени щрихи. Delete the graphic style “{name}”? Изтриване на графичния стил „{name}“? Delete Theme Изтриване на тема @@ -3634,6 +3633,7 @@ imageTrace Outline Контур @plural {n} item|{n} items {n} обект|{n} обекта @plural Color Table ({n} color)|Color Table ({n} colors) Цветна таблица ({n} цвят)|Цветна таблица ({n} цвята) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Изтриване на този графичен стил ({n})?|Изтриване на тези графични стилове ({n})? +@plural Delete this {n} brush?|Delete these {n} brushes? Изтриване на тази четка ({n})?|Изтриване на тези четки ({n})? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Изтриване на този {n} образец или група?|Изтриване на тези {n} образца и групи? @plural {n} Layer|{n} Layers {n} слой|{n} слоя @plural {n} Object|{n} Objects {n} обект|{n} обекта diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 4269d2b7e..cd1046755 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -1060,7 +1060,6 @@ No No Delete Tab Suprimeix la tabulació Delete the brush “{name}”? Voleu suprimir el pinzell “{name}”? - Delete these {count} brushes? Voleu suprimir aquests {count} pinzells? Strokes using deleted brushes become plain strokes. Els traços que utilitzen pinzells suprimits esdevenen traços normals. Delete the graphic style “{name}”? Voleu suprimir l’estil gràfic “{name}”? Delete the library “{name}”? Voleu suprimir la biblioteca “{name}”? @@ -4694,6 +4693,7 @@ @plural agrees with {n} default shortcut|agrees with {n} default shortcuts coincideix amb {n} drecera per defecte|coincideix amb {n} dreceres per defecte @plural Color Table ({n} color)|Color Table ({n} colors) Taula de colors ({n} color)|Taula de colors ({n} colors) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Voleu suprimir aquest {n} estil gràfic?|Voleu suprimir aquests {n} estils gràfics? +@plural Delete this {n} brush?|Delete these {n} brushes? Voleu suprimir aquest {n} pinzell?|Voleu suprimir aquests {n} pinzells? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Voleu suprimir aquesta {n} mostra o grup?|Voleu suprimir aquestes {n} mostres i grups? @plural {n} area highlighted|{n} areas highlighted {n} àrea ressaltada|{n} àrees ressaltades @plural {n} color|{n} colors {n} color|{n} colors diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 39c5e2be1..4ffe67aea 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -1559,7 +1559,6 @@ lighting Light Světlo Save to Swatches Uložit do vzorníku Delete Graphic Style (Alt-click: without asking) Odstranit grafický styl (Alt+kliknutí: bez dotazu) Delete the brush “{name}”? Odstranit štětec „{name}“? - Delete these {count} brushes? Odstranit těchto {count} štětců? Strokes using deleted brushes become plain strokes. Tahy používající odstraněné štětce se změní na běžné tahy. Delete the graphic style “{name}”? Odstranit grafický styl „{name}“? Delete these {n} graphic styles? Odstranit tyto grafické styly ({n})? @@ -4138,6 +4137,7 @@ imageTrace Outline Obrys @plural {n} item|{n} items {n} položka|{n} položky|{n} položek @plural Color Table ({n} color)|Color Table ({n} colors) Tabulka barev ({n} barva)|Tabulka barev ({n} barvy)|Tabulka barev ({n} barev) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Odstranit {n} grafický styl?|Odstranit {n} grafické styly?|Odstranit {n} grafických stylů? +@plural Delete this {n} brush?|Delete these {n} brushes? Odstranit {n} štětec?|Odstranit {n} štětce?|Odstranit {n} štětců? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Odstranit {n} položku vzorníku nebo skupinu?|Odstranit {n} položky vzorníku a skupiny?|Odstranit {n} položek vzorníku a skupin? @plural {n} Layer|{n} Layers {n} vrstva|{n} vrstvy|{n} vrstev @plural {n} Object|{n} Objects {n} objekt|{n} objekty|{n} objektů diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index f7021936c..bce83c7bd 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -1473,7 +1473,6 @@ lighting Light Lys Save to Swatches Gem i farveprøver Delete Graphic Style (Alt-click: without asking) Slet grafisk typografi (Alt-klik: uden at spørge) Delete the brush “{name}”? Slet penslen »{name}«? - Delete these {count} brushes? Slet disse {count} pensler? Strokes using deleted brushes become plain strokes. Streger, der bruger slettede pensler, bliver almindelige streger. Delete the graphic style “{name}”? Slet den grafiske typografi »{name}«? Delete these {n} graphic styles? Slet disse {n} grafiske typografier? @@ -3870,6 +3869,7 @@ imageTrace Outline Kontur @plural {n} item|{n} items {n} element|{n} elementer @plural Color Table ({n} color)|Color Table ({n} colors) Farvetabel ({n} farve)|Farvetabel ({n} farver) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Vil du slette denne {n} grafikstil?|Vil du slette disse {n} grafikstile? +@plural Delete this {n} brush?|Delete these {n} brushes? Vil du slette denne {n} pensel?|Vil du slette disse {n} pensler? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Slet denne {n} farveprøve eller gruppe?|Slet disse {n} farveprøver og grupper? @plural {n} Layer|{n} Layers {n} lag|{n} lag @plural {n} Object|{n} Objects {n} objekt|{n} objekter diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index dc9c67f8b..9e837d8eb 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -737,7 +737,6 @@ font-technology Variable Variabel No Nein Delete Tab Tabulator löschen Delete the brush “{name}”? Pinsel „{name}“ löschen? - Delete these {count} brushes? Diese {count} Pinsel löschen? Strokes using deleted brushes become plain strokes. Konturen mit gelöschten Pinseln werden zu einfachen Konturen. Delete the graphic style “{name}”? Grafikstil „{name}“ löschen? Delete Theme Thema löschen @@ -3621,6 +3620,7 @@ imageTrace Outline Kontur @plural {n} item|{n} items {n} Element|{n} Elemente @plural Color Table ({n} color)|Color Table ({n} colors) Farbtabelle ({n} Farbe)|Farbtabelle ({n} Farben) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Diesen {n} Grafikstil löschen?|Diese {n} Grafikstile löschen? +@plural Delete this {n} brush?|Delete these {n} brushes? Diesen {n} Pinsel löschen?|Diese {n} Pinsel löschen? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? {n} Farbfeld oder Gruppe löschen?|Diese {n} Farbfelder und Gruppen löschen? @plural {n} Layer|{n} Layers {n} Ebene|{n} Ebenen @plural {n} Object|{n} Objects {n} Objekt|{n} Objekte diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 150002aa4..e5ac83775 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -717,7 +717,6 @@ font-technology Variable Μεταβλητές No Όχι Delete Tab Διαγραφή στηλοθέτη Delete the brush “{name}”? Να διαγραφεί το πινέλο «{name}»; - Delete these {count} brushes? Να διαγραφούν αυτά τα {count} πινέλα; Strokes using deleted brushes become plain strokes. Οι πινελιές που χρησιμοποιούν διαγραμμένα πινέλα γίνονται απλές πινελιές. Delete the graphic style “{name}”? Να διαγραφεί το στυλ γραφικών «{name}»; Delete Theme Διαγραφή θέματος @@ -2032,6 +2031,7 @@ imageTrace Outline Περίγραμμα @plural {n} item|{n} items {n} στοιχείο|{n} στοιχεία @plural Color Table ({n} color)|Color Table ({n} colors) Πίνακας χρωμάτων ({n} χρώμα)|Πίνακας χρωμάτων ({n} χρώματα) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Να διαγραφεί αυτό το {n} στυλ γραφικών;|Να διαγραφούν αυτά τα {n} στυλ γραφικών; +@plural Delete this {n} brush?|Delete these {n} brushes? Να διαγραφεί αυτό το {n} πινέλο;|Να διαγραφούν αυτά τα {n} πινέλα; @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Να διαγραφεί αυτό το {n} δείγμα χρώματος ή ομάδα;|Να διαγραφούν αυτά τα {n} δείγματα χρωμάτων και οι ομάδες; @plural {n} Layer|{n} Layers {n} επίπεδο|{n} επίπεδα @plural {n} Object|{n} Objects {n} αντικείμενο|{n} αντικείμενα diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 2bbb31702..367692be2 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -758,7 +758,6 @@ font-technology Variable Variables No No Delete Tab Eliminar tabulación Delete the brush “{name}”? ¿Eliminar el pincel “{name}”? - Delete these {count} brushes? ¿Eliminar estos {count} pinceles? Strokes using deleted brushes become plain strokes. Los trazos que usan pinceles eliminados se convierten en trazos simples. Delete the graphic style “{name}”? ¿Eliminar el estilo gráfico “{name}”? Delete Theme Eliminar tema @@ -3706,6 +3705,7 @@ imageTrace Outline Contorno @plural {n} item|{n} items {n} elemento|{n} elementos @plural Color Table ({n} color)|Color Table ({n} colors) Tabla de colores ({n} color)|Tabla de colores ({n} colores) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? ¿Eliminar {n} estilo gráfico?|¿Eliminar estos {n} estilos gráficos? +@plural Delete this {n} brush?|Delete these {n} brushes? ¿Eliminar {n} pincel?|¿Eliminar estos {n} pinceles? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? ¿Eliminar {n} muestra o grupo?|¿Eliminar estas {n} muestras y grupos? @plural {n} Layer|{n} Layers {n} capa|{n} capas @plural {n} Object|{n} Objects {n} objeto|{n} objetos diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 1a276e0e7..d0b30760a 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -1533,7 +1533,6 @@ lighting Light Valo Save to Swatches Tallenna värimalleihin Delete Graphic Style (Alt-click: without asking) Poista grafiikkatyyli (Alt-napsautus: kysymättä) Delete the brush “{name}”? Poistetaanko sivellin ”{name}”? - Delete these {count} brushes? Poistetaanko nämä {count} sivellintä? Strokes using deleted brushes become plain strokes. Poistettuja siveltimiä käyttävät viivat muuttuvat tavallisiksi viivoiksi. Delete the graphic style “{name}”? Poistetaanko grafiikkatyyli ”{name}”? Delete these {n} graphic styles? Poistetaanko nämä {n} grafiikkatyyliä? @@ -4056,6 +4055,7 @@ imageTrace Outline Ääriviiva @plural {n} item|{n} items {n} kohde|{n} kohdetta @plural Color Table ({n} color)|Color Table ({n} colors) Väritaulukko ({n} väri)|Väritaulukko ({n} väriä) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Poistetaanko tämä {n} grafiikkatyyli?|Poistetaanko nämä {n} grafiikkatyyliä? +@plural Delete this {n} brush?|Delete these {n} brushes? Poistetaanko tämä {n} sivellin?|Poistetaanko nämä {n} sivellintä? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Poistetaanko tämä {n} värimalli tai ryhmä?|Poistetaanko nämä {n} värimallia ja ryhmää? @plural {n} Layer|{n} Layers {n} taso|{n} tasoa @plural {n} Object|{n} Objects {n} objekti|{n} objektia diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 68a78da7d..ab5fc9acd 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -760,7 +760,6 @@ font-technology Variable Variables No Non Delete Tab Supprimer la tabulation Delete the brush “{name}”? Supprimer la forme « {name} » ? - Delete these {count} brushes? Supprimer ces {count} formes ? Strokes using deleted brushes become plain strokes. Les contours utilisant des formes supprimées deviennent des contours simples. Delete the graphic style “{name}”? Supprimer le style graphique « {name} » ? Delete Theme Supprimer le thème @@ -3704,6 +3703,7 @@ imageTrace Outline Contour @plural {n} item|{n} items {n} élément|{n} éléments @plural Color Table ({n} color)|Color Table ({n} colors) Table des couleurs ({n} couleur)|Table des couleurs ({n} couleurs) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Supprimer {n} style graphique ?|Supprimer ces {n} styles graphiques ? +@plural Delete this {n} brush?|Delete these {n} brushes? Supprimer {n} forme ?|Supprimer ces {n} formes ? @plural {n} Layer|{n} Layers {n} calque|{n} calques @plural {n} Object|{n} Objects {n} objet|{n} objets @plural {n} area highlighted|{n} areas highlighted {n} zone mise en évidence|{n} zones mises en évidence diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 322770fb8..e91e7dfe5 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -982,7 +982,6 @@ font-technology Variable Változó No Nem Delete Tab Tabulátor törlése Delete the brush “{name}”? Törlöd ezt az ecsetet: „{name}”? - Delete these {count} brushes? Törlöd ezt a {count} ecsetet? Strokes using deleted brushes become plain strokes. A törölt ecseteket használó körvonalak egyszerű körvonalakká válnak. Delete the graphic style “{name}”? Törlöd ezt a grafikai stílust: „{name}”? Delete the library “{name}”? Törlöd ezt a könyvtárat: „{name}”? @@ -4459,6 +4458,7 @@ theme Appearance Kinézet imageTrace Outline Körvonal @plural Color Table ({n} color)|Color Table ({n} colors) Színtábla ({n} szín) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? {n} grafikai stílus törlése? +@plural Delete this {n} brush?|Delete these {n} brushes? {n} ecset törlése? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? {n} színminta és csoport törlése? @plural {n} area highlighted|{n} areas highlighted Kiemelt terület: {n} @plural {n} color|{n} colors {n} szín diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 25ee0213a..265da6fbe 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -1473,7 +1473,6 @@ lighting Light Cahaya Save to Swatches Simpan ke swatch Delete Graphic Style (Alt-click: without asking) Hapus gaya grafis (Alt+klik: tanpa konfirmasi) Delete the brush “{name}”? Hapus kuas “{name}”? - Delete these {count} brushes? Hapus {count} kuas ini? Strokes using deleted brushes become plain strokes. Goresan yang menggunakan kuas terhapus menjadi goresan biasa. Delete the graphic style “{name}”? Hapus gaya grafis “{name}”? Delete these {n} graphic styles? Hapus {n} gaya grafis ini? @@ -3870,6 +3869,7 @@ imageTrace Outline Kontur @plural {n} item|{n} items {n} item @plural Color Table ({n} color)|Color Table ({n} colors) Tabel warna ({n} warna) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Hapus {n} gaya grafis ini? +@plural Delete this {n} brush?|Delete these {n} brushes? Hapus {n} kuas ini? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Hapus {n} swatch dan grup ini? @plural {n} Layer|{n} Layers {n} lapisan @plural {n} Object|{n} Objects {n} objek diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 7685ad98a..af6874bbe 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -758,7 +758,6 @@ font-technology Variable Variabili No No Delete Tab Elimina tabulazione Delete the brush “{name}”? Eliminare il pennello “{name}”? - Delete these {count} brushes? Eliminare questi {count} pennelli? Strokes using deleted brushes become plain strokes. I tracciati che usano pennelli eliminati diventano tracciati semplici. Delete the graphic style “{name}”? Eliminare lo stile grafico “{name}”? Delete Theme Elimina tema @@ -3742,6 +3741,7 @@ imageTrace Outline Contorno @plural {n} item|{n} items {n} elemento|{n} elementi @plural Color Table ({n} color)|Color Table ({n} colors) Tabella colori ({n} colore)|Tabella colori ({n} colori) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Eliminare {n} stile grafico?|Eliminare questi {n} stili grafici? +@plural Delete this {n} brush?|Delete these {n} brushes? Eliminare {n} pennello?|Eliminare questi {n} pennelli? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Eliminare {n} campione o gruppo?|Eliminare questi {n} campioni e gruppi? @plural {n} Layer|{n} Layers {n} livello|{n} livelli @plural {n} Object|{n} Objects {n} oggetto|{n} oggetti diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 99376a0f1..f9ad60b87 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -1309,7 +1309,6 @@ font-technology Variable バリアブル Delete Width Point 幅ポイントを削除 Delete Workspace ワークスペースを削除 Delete the brush “{name}”? ブラシ「{name}」を削除しますか? - Delete these {count} brushes? これら {count} 個のブラシを削除しますか? Strokes using deleted brushes become plain strokes. 削除したブラシを使用する線は通常の線になります。 Delete the graphic style “{name}”? グラフィックスタイル「{name}」を削除しますか? Delete theme テーマを削除 @@ -3725,6 +3724,7 @@ file-filter Templates テンプレート imageTrace Outline アウトライン @plural Color Table ({n} color)|Color Table ({n} colors) カラーテーブル ({n} 色) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? {n} 個のグラフィックスタイルを削除しますか? +@plural Delete this {n} brush?|Delete these {n} brushes? {n} 個のブラシを削除しますか? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? これら {n} 個のスウォッチとグループを削除しますか? @plural {n} Layer|{n} Layers {n} レイヤー @plural {n} Object|{n} Objects {n} オブジェクト diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index b55b3f2c9..7f6eb84ba 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -1390,7 +1390,6 @@ lighting Light სინათლე Save to Swatches ფერის ნიმუშებში შენახვა Delete Graphic Style (Alt-click: without asking) გრაფიკული სტილის წაშლა (Alt-დაწკაპუნებით: დაუკითხავად) Delete the brush “{name}”? წაიშალოს ფუნჯი „{name}“? - Delete these {count} brushes? წაიშალოს ეს {count} ფუნჯი? Strokes using deleted brushes become plain strokes. წაშლილი ფუნჯებით დახატული შტრიხები ჩვეულებრივ შტრიხებად იქცევა. Delete the graphic style “{name}”? წაიშალოს გრაფიკული სტილი „{name}“? Delete these {n} graphic styles? წაიშალოს ეს გრაფიკული სტილები ({n})? @@ -3636,6 +3635,7 @@ font-technology Variable ცვლადი @plural {n} item|{n} items ელემენტი: {n} @plural Color Table ({n} color)|Color Table ({n} colors) ფერების ცხრილი (ფერი: {n}) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? წაიშალოს გრაფიკული სტილები ({n})? +@plural Delete this {n} brush?|Delete these {n} brushes? წაიშალოს ეს ფუნჯი ({n})? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? წაიშალოს ეს ფერის ნიმუშები და ჯგუფები ({n})? @plural {n} Layer|{n} Layers შრე: {n} @plural {n} Object|{n} Objects ობიექტი: {n} diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index e5dee07ee..a64392ef3 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -1300,7 +1300,6 @@ font-technology Variable 가변 Delete Width Point 너비 포인트 삭제 Delete Workspace 작업 영역 삭제 Delete the brush “{name}”? 브러시 “{name}”을(를) 삭제하시겠습니까? - Delete these {count} brushes? 이 브러시 {count}개를 삭제하시겠습니까? Strokes using deleted brushes become plain strokes. 삭제된 브러시를 사용한 선은 일반 선이 됩니다. Delete the graphic style “{name}”? 그래픽 스타일 “{name}”을(를) 삭제하시겠습니까? Delete theme 테마 삭제 @@ -3714,6 +3713,7 @@ file-filter Templates 템플릿 imageTrace Outline 윤곽선 @plural Color Table ({n} color)|Color Table ({n} colors) 색상 표 ({n}색)|색상 표 ({n}색) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? 그래픽 스타일 {n}개를 삭제하시겠습니까?|그래픽 스타일 {n}개를 삭제하시겠습니까? +@plural Delete this {n} brush?|Delete these {n} brushes? 브러시 {n}개를 삭제하시겠습니까?|브러시 {n}개를 삭제하시겠습니까? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? 견본과 그룹 {n}개를 삭제하시겠습니까? @plural {n} Layer|{n} Layers 레이어 {n}개|레이어 {n}개 @plural {n} Object|{n} Objects 개체 {n}개|개체 {n}개 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index bbee0d063..ed254e2a1 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -1487,7 +1487,6 @@ lighting Light Licht Save to Swatches Opslaan in stalen Delete Graphic Style (Alt-click: without asking) Grafische stijl verwijderen (Alt-klik: zonder vragen) Delete the brush “{name}”? Kwast „{name}” verwijderen? - Delete these {count} brushes? Deze {count} kwasten verwijderen? Strokes using deleted brushes become plain strokes. Lijnen die verwijderde kwasten gebruiken, worden gewone lijnen. Delete the graphic style “{name}”? De grafische stijl „{name}” verwijderen? Delete these {n} graphic styles? Deze {n} grafische stijlen verwijderen? @@ -3884,6 +3883,7 @@ imageTrace Outline Contour @plural {n} item|{n} items {n} item|{n} items @plural Color Table ({n} color)|Color Table ({n} colors) Kleurentabel ({n} kleur)|Kleurentabel ({n} kleuren) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Deze {n} grafische stijl verwijderen?|Deze {n} grafische stijlen verwijderen? +@plural Delete this {n} brush?|Delete these {n} brushes? Deze {n} kwast verwijderen?|Deze {n} kwasten verwijderen? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Deze {n} staal of groep verwijderen?|Deze {n} stalen en groepen verwijderen? @plural {n} Layer|{n} Layers {n} laag|{n} lagen @plural {n} Object|{n} Objects {n} object|{n} objecten diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 95d62b9a0..f2e5c5964 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -1473,7 +1473,6 @@ lighting Light Światło Save to Swatches Zapisz w próbkach Delete Graphic Style (Alt-click: without asking) Usuń styl graficzny (kliknięcie z Alt: bez pytania) Delete the brush “{name}”? Usunąć pędzel „{name}”? - Delete these {count} brushes? Usunąć te {count} pędzle? Strokes using deleted brushes become plain strokes. Obrysy używające usuniętych pędzli stają się zwykłymi obrysami. Delete the graphic style “{name}”? Usunąć styl graficzny „{name}”? Delete these {n} graphic styles? Usunąć te style graficzne ({n})? @@ -3964,6 +3963,7 @@ imageTrace Outline Kontur @plural {n} item|{n} items {n} element|{n} elementy|{n} elementów @plural Color Table ({n} color)|Color Table ({n} colors) Tablica kolorów ({n} kolor)|Tablica kolorów ({n} kolory)|Tablica kolorów ({n} kolorów) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Usunąć {n} styl graficzny?|Usunąć {n} style graficzne?|Usunąć {n} stylów graficznych? +@plural Delete this {n} brush?|Delete these {n} brushes? Usunąć {n} pędzel?|Usunąć {n} pędzle?|Usunąć {n} pędzli? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Usunąć {n} próbkę lub grupę?|Usunąć {n} próbki i grupy?|Usunąć {n} próbek i grup? @plural {n} Layer|{n} Layers {n} warstwa|{n} warstwy|{n} warstw @plural {n} Object|{n} Objects {n} obiekt|{n} obiekty|{n} obiektów diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 7f4d8287a..4d39287c5 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -675,7 +675,6 @@ Delete Width Point Excluir Ponto de Largura Delete Workspace Excluir Espaço de Trabalho Delete the brush “{name}”? Excluir o pincel “{name}”? - Delete these {count} brushes? Excluir estes {count} pincéis? Strokes using deleted brushes become plain strokes. Traços que usam pincéis excluídos tornam-se traços simples. Delete the graphic style “{name}”? Excluir o estilo gráfico “{name}”? Delete theme Excluir tema @@ -3044,6 +3043,7 @@ imageTrace Outline Contorno @plural {n} item|{n} items {n} item|{n} itens @plural Color Table ({n} color)|Color Table ({n} colors) Tabela de Cores ({n} cor)|Tabela de Cores ({n} cores) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Excluir este {n} estilo gráfico?|Excluir estes {n} estilos gráficos? +@plural Delete this {n} brush?|Delete these {n} brushes? Excluir este {n} pincel?|Excluir estes {n} pincéis? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Excluir esta {n} amostra ou grupo?|Excluir estas {n} amostras e grupos? @plural {n} Layer|{n} Layers {n} Camada|{n} Camadas @plural {n} Object|{n} Objects {n} Objeto|{n} Objetos diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 583a3f09a..952171bbf 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -756,7 +756,6 @@ font-technology Variable Вариативные No Нет Delete Tab Удалить табуляцию Delete the brush “{name}”? Удалить кисть «{name}»? - Delete these {count} brushes? Удалить эти кисти ({count})? Strokes using deleted brushes become plain strokes. Обводки, использующие удалённые кисти, становятся обычными обводками. Delete the graphic style “{name}”? Удалить графический стиль «{name}»? Delete Theme Удалить тему @@ -3738,6 +3737,7 @@ imageTrace Outline Контур @plural {n} item|{n} items {n} элемент|{n} элемента|{n} элементов @plural Color Table ({n} color)|Color Table ({n} colors) Цветовая таблица ({n} цвет)|Цветовая таблица ({n} цвета)|Цветовая таблица ({n} цветов) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Удалить этот графический стиль ({n})?|Удалить эти графические стили ({n})?|Удалить эти графические стили ({n})? +@plural Delete this {n} brush?|Delete these {n} brushes? Удалить эту кисть ({n})?|Удалить эти кисти ({n})?|Удалить {n} кистей? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Удалить образцы и группы ({n})?|Удалить {n} образца и группы?|Удалить {n} образцов и групп? @plural {n} Layer|{n} Layers {n} слой|{n} слоя|{n} слоёв @plural {n} Object|{n} Objects {n} объект|{n} объекта|{n} объектов diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 1b6882662..9f24f8e02 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -745,7 +745,6 @@ font-technology Variable Variabla No Nej Delete Tab Radera tabb Delete the brush “{name}”? Radera penseln ”{name}”? - Delete these {count} brushes? Radera dessa {count} penslar? Strokes using deleted brushes become plain strokes. Linjer som använder borttagna penslar blir vanliga linjer. Delete the graphic style “{name}”? Radera grafikstilen ”{name}”? Delete Theme Radera tema @@ -3634,6 +3633,7 @@ imageTrace Outline Kontur @plural {n} item|{n} items {n} objekt|{n} objekt @plural Color Table ({n} color)|Color Table ({n} colors) Färgtabell ({n} färg)|Färgtabell ({n} färger) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Radera {n} grafisk stil?|Radera de här {n} grafiska stilarna? +@plural Delete this {n} brush?|Delete these {n} brushes? Radera {n} pensel?|Radera dessa {n} penslar? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Radera {n} färgruta eller grupp?|Radera dessa {n} färgrutor och grupper? @plural {n} Layer|{n} Layers {n} lager|{n} lager @plural {n} Object|{n} Objects {n} objekt|{n} objekt diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index d318f8a75..91fd8143d 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -737,7 +737,6 @@ font-technology Variable Değişken No Hayır Delete Tab Sekmeyi Sil Delete the brush “{name}”? “{name}” fırçası silinsin mi? - Delete these {count} brushes? Bu {count} fırça silinsin mi? Strokes using deleted brushes become plain strokes. Silinen fırçaları kullanan konturlar düz konturlara dönüşür. Delete the graphic style “{name}”? “{name}” grafik stili silinsin mi? Delete Theme Temayı Sil @@ -3528,6 +3527,7 @@ imageTrace Outline Kontur @plural {n} item|{n} items {n} öğe @plural Color Table ({n} color)|Color Table ({n} colors) Renk Tablosu ({n} renk) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Bu {n} grafik stili silinsin mi? +@plural Delete this {n} brush?|Delete these {n} brushes? Bu {n} fırça silinsin mi? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Bu {n} renk örneği ve grup silinsin mi? @plural {n} Layer|{n} Layers {n} Katman @plural {n} Object|{n} Objects {n} Nesne diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 5dd9b8979..750796afe 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -752,7 +752,6 @@ font-technology Variable Варіативні No Ні Delete Tab Видалити табуляцію Delete the brush “{name}”? Видалити пензель «{name}»? - Delete these {count} brushes? Видалити ці пензлі ({count})? Strokes using deleted brushes become plain strokes. Обведення, що використовують видалені пензлі, стають звичайними обведеннями. Delete the graphic style “{name}”? Видалити графічний стиль «{name}»? Delete Theme Видалити тему @@ -3735,6 +3734,7 @@ imageTrace Outline Контур @plural {n} item|{n} items {n} елемент|{n} елементи|{n} елементів @plural Color Table ({n} color)|Color Table ({n} colors) Таблиця кольорів ({n} колір)|Таблиця кольорів ({n} кольори)|Таблиця кольорів ({n} кольорів) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Видалити цей графічний стиль ({n})?|Видалити ці графічні стилі ({n})?|Видалити ці графічні стилі ({n})? +@plural Delete this {n} brush?|Delete these {n} brushes? Видалити цей пензель ({n})?|Видалити ці пензлі ({n})?|Видалити {n} пензлів? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Видалити зразки та групи ({n})?|Видалити {n} зразки та групи?|Видалити {n} зразків і груп? @plural {n} Layer|{n} Layers {n} шар|{n} шари|{n} шарів @plural {n} Object|{n} Objects {n} об’єкт|{n} об’єкти|{n} об’єктів diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 6136b2ddd..494b40265 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -878,7 +878,6 @@ font-technology Variable Biến thiên No Không Delete Tab Xóa tab Delete the brush “{name}”? Xóa cọ “{name}”? - Delete these {count} brushes? Xóa {count} cọ này? Strokes using deleted brushes become plain strokes. Các nét dùng cọ đã xóa trở thành nét thông thường. Delete the graphic style “{name}”? Xóa kiểu đồ họa “{name}”? Delete the library “{name}”? Xóa thư viện “{name}”? @@ -4100,6 +4099,7 @@ gradient-kind Radial Hướng tâm imageTrace Outline Đường viền @plural Color Table ({n} color)|Color Table ({n} colors) Bảng màu ({n} màu) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Xóa {n} kiểu đồ họa này? +@plural Delete this {n} brush?|Delete these {n} brushes? Xóa {n} cọ này? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? Xóa {n} mẫu màu và nhóm này? @plural {n} area highlighted|{n} areas highlighted {n} vùng được tô sáng @plural {n} color|{n} colors {n} màu diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 7fbdf119b..105fefd26 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -701,7 +701,6 @@ No 否 Delete Tab 删除制表位 Delete the brush “{name}”? 要删除画笔“{name}”吗? - Delete these {count} brushes? 要删除这 {count} 个画笔吗? Strokes using deleted brushes become plain strokes. 使用已删除画笔的描边会变成普通描边。 Delete the graphic style “{name}”? 要删除图形样式“{name}”吗? Delete Theme 删除主题 @@ -3581,6 +3580,7 @@ imageTrace Outline 轮廓 @plural {n} item|{n} items {n} 个项目 @plural Color Table ({n} color)|Color Table ({n} colors) 颜色表 ({n} 色) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? 要删除这 {n} 个图形样式吗? +@plural Delete this {n} brush?|Delete these {n} brushes? 要删除这 {n} 个画笔吗? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? 要删除这 {n} 个色板和编组吗? @plural {n} Layer|{n} Layers {n} 个图层 @plural {n} Object|{n} Objects {n} 个对象 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 3cb07c146..7ffb1831a 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -720,7 +720,6 @@ font-technology Variable 可變 No 否 Delete Tab 刪除定位點 Delete the brush “{name}”? 要刪除筆刷「{name}」嗎? - Delete these {count} brushes? 要刪除這 {count} 個筆刷嗎? Strokes using deleted brushes become plain strokes. 使用已刪除筆刷的筆畫會變成一般筆畫。 Delete the graphic style “{name}”? 要刪除繪圖樣式「{name}」嗎? Delete Theme 刪除主題 @@ -4560,6 +4559,7 @@ imageTrace Outline 輪廓 @plural {n} item|{n} items {n} 個項目 @plural Color Table ({n} color)|Color Table ({n} colors) 色彩表 ({n} 色) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? 要刪除這 {n} 個繪圖樣式嗎? +@plural Delete this {n} brush?|Delete these {n} brushes? 要刪除這 {n} 個筆刷嗎? @plural Delete this {n} swatch or group?|Delete these {n} swatches and groups? 要刪除這 {n} 個色票和群組嗎? @plural {n} Layer|{n} Layers {n} 個圖層 @plural {n} Object|{n} Objects {n} 個物件 diff --git a/crates/ui-egui/src/panels/brushes.rs b/crates/ui-egui/src/panels/brushes.rs index 22b7d9401..b73404730 100644 --- a/crates/ui-egui/src/panels/brushes.rs +++ b/crates/ui-egui/src/panels/brushes.rs @@ -216,7 +216,7 @@ fn delete(app: &mut VectorcraftApp, names: &[String], now: bool) { }; let message = match names { [name] => crate::i18n::fmt(tl!("Delete the brush “{name}”?"), &[("name", name)]), - _ => crate::i18n::fmt(tl!("Delete these {count} brushes?"), &[("count", &names.len().to_string())]), + _ => crate::i18n::tn(names.len() as u64, "Delete this {n} brush?", "Delete these {n} brushes?"), }; crate::dialogs::confirm::ask(app, &message, tl!("Strokes using deleted brushes become plain strokes."), "brush.delete", params); } diff --git a/crates/ui-egui/src/panels/brushes/tests.rs b/crates/ui-egui/src/panels/brushes/tests.rs index 711a60199..421c0162a 100644 --- a/crates/ui-egui/src/panels/brushes/tests.rs +++ b/crates/ui-egui/src/panels/brushes/tests.rs @@ -163,6 +163,19 @@ fn assert_delete_dialog(app: &VectorcraftApp, message: &str) { assert_eq!(d.str("detail"), "Strokes using deleted brushes become plain strokes."); } +#[test] +fn deleting_five_brushes_uses_polish_many_form() { + let previous = crate::i18n::current(); + let polish = crate::i18n::Lang::from_code("pl").unwrap(); + crate::i18n::set_current(polish); + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + let names: Vec = (1..=5).map(|n| format!("Brush {n}")).collect(); + delete(&mut app, &names, false); + let message = app.ui.dialog.as_ref().map(|d| d.str("message")); + crate::i18n::set_current(previous); + assert_eq!(message, Some("Usunąć 5 pędzli?".to_string())); +} + /// Click the panel menu's item `label` (frames at `time`, `time + 0.5`). fn menu_click(ctx: &egui::Context, app: &mut VectorcraftApp, label: &str, time: f64) { let out = frame_with(ctx, app, vec![], egui::Modifiers::NONE, time, menu); From b1aa5767648715225b5ebc294bdf7698e3e39a1b Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 30 Oct 2026 21:56:48 -0700 Subject: [PATCH 4/9] Brushes: Delete Brush asks Yes or No for unused brushes, and Remove Strokes or Cancel for brushes in use The question for brushes no stroke uses reads "Delete the brush selection?" with Yes and No, from the bottom button and the panel menu, and Alt-click (Option-click on macOS) on the button still deletes them without asking. When a stroke uses one of the brushes, the button, Alt-click and the menu item ask with Remove Strokes and Cancel; Remove Strokes deletes the brushes and the strokes that used them become plain strokes. brush.unused also counts the tile that pattern editing's Cancel puts back, which brush.delete already clears, so the panel asks the in-use question for a brush only that tile uses. --- crates/engine/src/cmd/brushsym.rs | 2 +- crates/engine/src/cmd/brushsym/brushes.rs | 7 +- crates/engine/src/tests/brushsym.rs | 25 +++++++ crates/ui-egui/src/dialogs.rs | 2 + crates/ui-egui/src/dialogs/brush_delete.rs | 61 +++++++++++++++ .../ui-egui/src/dialogs/brush_delete/tests.rs | 71 ++++++++++++++++++ crates/ui-egui/src/i18n/bg.tsv | 7 +- crates/ui-egui/src/i18n/bs.tsv | 5 ++ crates/ui-egui/src/i18n/ca.tsv | 7 +- crates/ui-egui/src/i18n/cs.tsv | 7 +- crates/ui-egui/src/i18n/da.tsv | 7 +- crates/ui-egui/src/i18n/de.tsv | 7 +- crates/ui-egui/src/i18n/el.tsv | 7 +- crates/ui-egui/src/i18n/es.tsv | 7 +- crates/ui-egui/src/i18n/fi.tsv | 7 +- crates/ui-egui/src/i18n/fr.tsv | 8 +- crates/ui-egui/src/i18n/hu.tsv | 7 +- crates/ui-egui/src/i18n/id.tsv | 7 +- crates/ui-egui/src/i18n/it.tsv | 7 +- crates/ui-egui/src/i18n/ja.tsv | 7 +- crates/ui-egui/src/i18n/ka.tsv | 7 +- crates/ui-egui/src/i18n/ko.tsv | 7 +- crates/ui-egui/src/i18n/nl.tsv | 7 +- crates/ui-egui/src/i18n/pl.tsv | 7 +- crates/ui-egui/src/i18n/pt-br.tsv | 7 +- crates/ui-egui/src/i18n/ru.tsv | 7 +- crates/ui-egui/src/i18n/sv.tsv | 7 +- crates/ui-egui/src/i18n/tr.tsv | 7 +- crates/ui-egui/src/i18n/uk.tsv | 7 +- crates/ui-egui/src/i18n/vi.tsv | 7 +- crates/ui-egui/src/i18n/zh-hans.tsv | 7 +- crates/ui-egui/src/i18n/zh-hant.tsv | 7 +- crates/ui-egui/src/panels/brushes.rs | 16 ++-- crates/ui-egui/src/panels/brushes/tests.rs | 75 +++++++++++++++---- docs/mcp.md | 6 +- docs/target-app-parity.md | 2 +- 36 files changed, 367 insertions(+), 81 deletions(-) create mode 100644 crates/ui-egui/src/dialogs/brush_delete.rs create mode 100644 crates/ui-egui/src/dialogs/brush_delete/tests.rs diff --git a/crates/engine/src/cmd/brushsym.rs b/crates/engine/src/cmd/brushsym.rs index 8ef171d32..7b37fea76 100644 --- a/crates/engine/src/cmd/brushsym.rs +++ b/crates/engine/src/cmd/brushsym.rs @@ -125,7 +125,7 @@ pub fn specs() -> Vec { "Select All Unused", [], None, - "{} → {names: [the brushes no stroke paints with, in library order]} (the Brushes panel selects them): strokes in the art (opacity masks included), symbols, graph designs, pattern tiles and graphic styles count, and so do strokes in the art of a brush that is used", + "{} → {names: [the brushes no stroke paints with, in library order]} (the Brushes panel selects them): strokes in the art (opacity masks included), symbols, graph designs, pattern tiles (with the tiles that pattern editing's Cancel puts back) and graphic styles count, and so do strokes in the art of a brush that is used", has_doc, brush_unused ), diff --git a/crates/engine/src/cmd/brushsym/brushes.rs b/crates/engine/src/cmd/brushsym/brushes.rs index 66dd546e9..f5e5c73fc 100644 --- a/crates/engine/src/cmd/brushsym/brushes.rs +++ b/crates/engine/src/cmd/brushsym/brushes.rs @@ -362,14 +362,15 @@ fn art_brushes(n: &Node, out: &mut Vec) { } /// The brushes no stroke paints with. Strokes in the art (opacity masks included), symbols, graph -/// designs, pattern tiles and graphic styles count, and so do the strokes in the art of every brush -/// that a counted stroke paints with. +/// designs, pattern tiles and the tiles that pattern editing's Cancel puts back, and graphic styles +/// count, and so do the strokes in the art of every brush that a counted stroke paints with. pub(super) fn brush_unused(s: &mut Session, _: &Value) -> Result { let d = &s.doc()?.doc; let lib = brush::library(d); let mut todo = vec![]; let trees = d.layers.iter().chain(d.symbols.iter().map(|s| &s.art)).chain(d.graph_designs.iter().map(|g| &g.art)); - trees.chain(d.patterns.iter().flat_map(|p| &p.art)).for_each(|n| art_brushes(n, &mut todo)); + let patterns = d.patterns.iter().chain(d.pattern_edit.iter().filter_map(|pe| pe.original.as_ref())); + trees.chain(patterns.flat_map(|p| &p.art)).for_each(|n| art_brushes(n, &mut todo)); d.graphic_styles.iter().for_each(|g| stroke_brushes(&g.appearance.items, &mut todo)); let mut used = BTreeSet::new(); while let Some(name) = todo.pop() { diff --git a/crates/engine/src/tests/brushsym.rs b/crates/engine/src/tests/brushsym.rs index c6a33ffc6..bba39230b 100644 --- a/crates/engine/src/tests/brushsym.rs +++ b/crates/engine/src/tests/brushsym.rs @@ -457,6 +457,31 @@ fn brush_unused_lists_the_brushes_no_stroke_paints_with() { assert_eq!(unused(&mut s), ["3 pt. Round", "6 pt. Flat", "Charcoal"]); } +/// A stroke in the tile that pattern editing's Cancel puts back counts as a use, as `brush.delete` +/// clears it there. +#[test] +fn brush_unused_counts_pattern_edit_originals() { + let mut s = session(); + let id = rect(&mut s, 10.0, 10.0, 40.0, 20.0); + s.execute("brush.apply", &json!({"name": "6 pt. Flat", "ids": [id.0]})).unwrap(); + let name = s.execute("object.pattern.make", &json!({"ids": [id.0], "edit": false})).unwrap()["name"].clone(); + s.execute("brush.remove", &json!({"ids": [id.0]})).unwrap(); + s.execute("object.pattern.edit", &json!({ "name": name })).unwrap(); + // The tile's copies in the editing layer are selected; only the tile kept for Cancel paints with the brush. + s.execute("brush.remove", &json!({})).unwrap(); + let d = std::sync::Arc::make_mut(&mut s.doc_mut().unwrap().doc); + let original = d.pattern_edit.as_ref().and_then(|pe| pe.original.as_ref()).expect("pattern edit original"); + assert_eq!(original.art.first().and_then(|n| n.appearance.stroke()).and_then(|k| k.brush.as_deref()), Some("6 pt. Flat")); + for pattern in &mut d.patterns { + for art in &mut pattern.art { + if let Some(stroke) = std::sync::Arc::make_mut(art).appearance.stroke_mut() { + stroke.brush = None; + } + } + } + assert!(!unused(&mut s).contains(&"6 pt. Flat".to_string())); +} + /// A brush counts as used when a stroke paints with it in an opacity mask, a symbol, a graph /// design, a pattern tile, a graphic style, or the art of a brush that is used. The art of a brush /// that is not used, its own strokes included, does not count. diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index 488cd1d95..b2a42af49 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -12,6 +12,7 @@ pub mod action_set_options; pub mod artboard_options; pub mod blend_options; mod brush_art_options; +pub mod brush_delete; pub mod brush_options; pub mod color_balance; pub mod color_guide_options; @@ -293,6 +294,7 @@ registry! { FindFont: ["findFont"] => DialogSpec::window(crate::find_font::show, |app, _| crate::find_font::confirm(app)), SwatchOptions: [swatch_options::KIND] => swatch_options::SPEC, Confirm: [confirm::KIND] => confirm::SPEC, + BrushDelete: [brush_delete::KIND] => brush_delete::SPEC, Message: [confirm::MESSAGE] => confirm::MESSAGE_SPEC, Replace: [confirm::REPLACE] => confirm::REPLACE_SPEC, NewSwatch: [new_swatch::KIND] => new_swatch::SPEC, diff --git a/crates/ui-egui/src/dialogs/brush_delete.rs b/crates/ui-egui/src/dialogs/brush_delete.rs new file mode 100644 index 000000000..9488d14be --- /dev/null +++ b/crates/ui-egui/src/dialogs/brush_delete.rs @@ -0,0 +1,61 @@ +//! The Brushes panel's Delete Brush question ([`ask`]): Yes or No when none of the brushes is in +//! use, else Remove Strokes or Cancel. Yes and Remove Strokes run `brush.delete`, which leaves the +//! strokes that used the brushes as plain strokes. +//! +//! Fields: `message` (the question, shown as the heading), `used` (whether a brush is in use) and +//! `params` (the `brush.delete` params). + +use serde_json::{Value, json}; + +use super::{DialogAction, DialogSpec}; +use crate::VectorcraftApp; +use crate::state::Dialog; +use crate::widgets; + +/// The dialog kind of the Delete Brush question. +pub const KIND: &str = "brushDelete"; + +pub(super) const SPEC: DialogSpec = + DialogSpec { heading: |d| d.str("message"), body_with_actions: Some(body), confirm, ok: None, max_width: Some(540.0), ..DialogSpec::FORM }; + +/// Ask whether to delete the brushes `params` names (`used`: one of them is in use). +pub fn ask(app: &mut VectorcraftApp, params: Value, used: bool) { + let message = if used { + tl!("One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed.") + } else { + tl!("Delete the brush selection?") + }; + app.ui.dialog = Some(Dialog::new(KIND, json!({"params": params, "used": used, "message": message}))); +} + +fn body(_: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> DialogAction { + let mut action = DialogAction::None; + ui.horizontal(|ui| { + if d.bool("used") { + if widgets::primary_button_enabled(ui, tl!("Remove Strokes"), true).clicked() { + action = DialogAction::Confirm; + } + if widgets::secondary_button(ui, tl!("Cancel")).clicked() { + action = DialogAction::Cancel; + } + } else { + if widgets::primary_button_enabled(ui, tl!("Yes"), true).clicked() { + action = DialogAction::Confirm; + } + if widgets::secondary_button(ui, tl!("No")).clicked() { + action = DialogAction::Cancel; + } + } + }); + action +} + +/// Closes before running, so a dialog the command opens stays open. +fn confirm(app: &mut VectorcraftApp, d: &Dialog) -> Result { + let params = d.fields.get("params").cloned().unwrap_or_else(|| json!({})); + app.ui.dialog = None; + app.run("brush.delete", params) +} + +#[cfg(test)] +mod tests; diff --git a/crates/ui-egui/src/dialogs/brush_delete/tests.rs b/crates/ui-egui/src/dialogs/brush_delete/tests.rs new file mode 100644 index 000000000..407351c79 --- /dev/null +++ b/crates/ui-egui/src/dialogs/brush_delete/tests.rs @@ -0,0 +1,71 @@ +use egui::{Pos2, Rect, pos2, vec2}; +use serde_json::json; +use vectorcraft_doc::NodeId; +use vectorcraft_engine::Session; + +use super::*; + +fn frame(ctx: &egui::Context, app: &mut VectorcraftApp, events: Vec, time: f64) -> egui::FullOutput { + let screen_rect = Some(Rect::from_min_size(Pos2::ZERO, vec2(800.0, 600.0))); + let input = egui::RawInput { screen_rect, time: Some(time), events, ..Default::default() }; + let mut out = ctx.run_ui(input, |ui| crate::dialogs::show(app, ui.ctx())); + out.textures_delta.clear(); + out +} + +fn press(ctx: &egui::Context, app: &mut VectorcraftApp, label: &str, time: f64) { + frame(ctx, app, vec![], time); + let out = frame(ctx, app, vec![], time + 0.1); + let nodes = &out.platform_output.accesskit_update.as_ref().expect("dialog accessibility tree").nodes; + let button = nodes.iter().find(|(_, node)| node.label().map(str::trim) == Some(label)); + let bounds = button.and_then(|(_, node)| node.bounds()).expect("visible button"); + let at = pos2(((bounds.x0 + bounds.x1) / 2.0) as f32, ((bounds.y0 + bounds.y1) / 2.0) as f32); + let button = |pressed| egui::Event::PointerButton { pos: at, button: egui::PointerButton::Primary, pressed, modifiers: egui::Modifiers::NONE }; + frame(ctx, app, vec![egui::Event::PointerMoved(at), button(true), button(false)], time + 0.2); +} + +fn context() -> egui::Context { + let ctx = egui::Context::default(); + ctx.enable_accesskit(); + crate::theme::install_fonts(&ctx); + crate::theme::apply(&ctx, Default::default()); + ctx +} + +#[test] +fn visible_yes_and_no_buttons_control_unused_deletion() { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 200, "height": 100})).unwrap(); + let name = app.run("brush.list", json!({})).unwrap()["brushes"][0]["name"].as_str().unwrap().to_string(); + let ctx = context(); + let before = app.session.active().unwrap().history.undo.len(); + ask(&mut app, json!({"name": name}), false); + press(&ctx, &mut app, "No", 0.0); + assert!(app.ui.dialog.is_none()); + assert_eq!(app.session.active().unwrap().history.undo.len(), before); + assert!(app.run("brush.get", json!({"name": name})).is_ok()); + ask(&mut app, json!({"name": name}), false); + press(&ctx, &mut app, "Yes", 1.0); + assert!(app.run("brush.get", json!({"name": name})).is_err()); + assert_eq!(app.session.active().unwrap().history.undo.len(), before + 1); +} + +#[test] +fn visible_remove_strokes_and_cancel_buttons_control_used_deletion() { + for choice in ["Cancel", "Remove Strokes"] { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 200, "height": 100})).unwrap(); + let path = NodeId(app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 60, "height": 40})).unwrap()["id"].as_u64().unwrap()); + let name = "10 pt. Oval"; + app.run("brush.apply", json!({"name": name})).unwrap(); + let before = app.session.active().unwrap().history.undo.len(); + let ctx = context(); + ask(&mut app, json!({"name": name}), true); + press(&ctx, &mut app, choice, 0.0); + assert!(app.ui.dialog.is_none()); + assert_eq!(app.session.active().unwrap().history.undo.len(), before + usize::from(choice != "Cancel")); + let stroke = app.session.active().unwrap().doc.node(path).and_then(|n| n.appearance.stroke()).unwrap(); + assert_eq!(stroke.brush.as_deref(), (choice == "Cancel").then_some(name)); + assert!(stroke.width > 0.0); + } +} diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index 5a5efddad..e423aab1a 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -742,8 +742,6 @@ font-technology Variable Променливи Yes Да No Не Delete Tab Изтриване на табулация - Delete the brush “{name}”? Да се изтрие четката „{name}“? - Strokes using deleted brushes become plain strokes. Щрихите, които използват изтритите четки, стават обикновени щрихи. Delete the graphic style “{name}”? Изтриване на графичния стил „{name}“? Delete Theme Изтриване на тема Delete theme Изтриване на тема @@ -5901,6 +5899,11 @@ breakText Glyphs Глифи Gap 4 Разстояние 4 Dash 5 Тире 5 Gap 5 Разстояние 5 + Delete the brush selection? Да се изтрият избраните четки? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Една или повече от четките се използват и не могат да бъдат изтрити, докато щрихите им не бъдат разширени или премахнати. + Remove Strokes Премахване на щрихи + Yes Да + No Не # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Инструменти за подреждане Arrange in Grid… Подреждане в мрежа… diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index da8c5d134..6b4851468 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -5931,6 +5931,11 @@ shape Open Otvoren @msg `follow` must be "average", "a" or "b" `follow` mora biti "average", "a" ili "b" @msg the paths have nothing to merge there putanje tu nemaju šta spojiti @msg the path is locked or hidden putanja je zaključana ili skrivena + Delete the brush selection? Izbrisati odabrane četkice? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Jedna ili više četkica se koristi i ne mogu se izbrisati dok se njihovi potezi ne prošire ili uklone. + Remove Strokes Ukloni poteze + Yes Da + No Ne # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Alati za raspoređivanje Arrange in Grid… Rasporedi u mrežu… diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index cd1046755..970625ac0 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -1059,8 +1059,6 @@ Yes Sí No No Delete Tab Suprimeix la tabulació - Delete the brush “{name}”? Voleu suprimir el pinzell “{name}”? - Strokes using deleted brushes become plain strokes. Els traços que utilitzen pinzells suprimits esdevenen traços normals. Delete the graphic style “{name}”? Voleu suprimir l’estil gràfic “{name}”? Delete the library “{name}”? Voleu suprimir la biblioteca “{name}”? Delete Theme Suprimeix el tema @@ -6001,6 +5999,11 @@ breakText Glyphs Glifs Gap 4 Separació 4 Dash 5 Guió 5 Gap 5 Separació 5 + Delete the brush selection? Voleu suprimir la selecció de pinzells? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Un o més pinzells estan en ús i no es poden suprimir fins que els traços s’expandeixin o s’eliminin. + Remove Strokes Elimina els traços + Yes Sí + No No # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Eines d’organització Arrange in Grid… Organitza en quadrícula… diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 4ffe67aea..bc8c6b09b 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -1558,8 +1558,6 @@ lighting Light Světlo Reverse Gradient Obrátit přechod Save to Swatches Uložit do vzorníku Delete Graphic Style (Alt-click: without asking) Odstranit grafický styl (Alt+kliknutí: bez dotazu) - Delete the brush “{name}”? Odstranit štětec „{name}“? - Strokes using deleted brushes become plain strokes. Tahy používající odstraněné štětce se změní na běžné tahy. Delete the graphic style “{name}”? Odstranit grafický styl „{name}“? Delete these {n} graphic styles? Odstranit tyto grafické styly ({n})? Delete this {n} graphic style? Odstranit tento grafický styl ({n})? @@ -6010,6 +6008,11 @@ breakText Glyphs Glyfy Gap 4 Mezera 4 Dash 5 Čárka 5 Gap 5 Mezera 5 + Delete the brush selection? Odstranit vybrané štětce? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Jeden nebo více štětců se používá a nelze je odstranit, dokud jejich tahy nebudou rozloženy nebo odebrány. + Remove Strokes Odebrat tahy + Yes Ano + No Ne # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Nástroje uspořádání Arrange in Grid… Uspořádat do mřížky… diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index bce83c7bd..fc45ef6e5 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -1472,8 +1472,6 @@ lighting Light Lys Reverse Gradient Omvend gradient Save to Swatches Gem i farveprøver Delete Graphic Style (Alt-click: without asking) Slet grafisk typografi (Alt-klik: uden at spørge) - Delete the brush “{name}”? Slet penslen »{name}«? - Strokes using deleted brushes become plain strokes. Streger, der bruger slettede pensler, bliver almindelige streger. Delete the graphic style “{name}”? Slet den grafiske typografi »{name}«? Delete these {n} graphic styles? Slet disse {n} grafiske typografier? Delete this {n} graphic style? Slet denne {n} grafiske typografi? @@ -5915,6 +5913,11 @@ breakText Glyphs Glyffer Gap 4 Mellemrum 4 Dash 5 Streg 5 Gap 5 Mellemrum 5 + Delete the brush selection? Slet de valgte pensler? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. En eller flere pensler er i brug og kan ikke slettes, før deres streger er udvidet eller fjernet. + Remove Strokes Fjern streger + Yes Ja + No Nej # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Arrangeringsværktøjer Arrange in Grid… Arrangér i gitter… diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 9e837d8eb..a36a57825 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -736,8 +736,6 @@ font-technology Variable Variabel Yes Ja No Nein Delete Tab Tabulator löschen - Delete the brush “{name}”? Pinsel „{name}“ löschen? - Strokes using deleted brushes become plain strokes. Konturen mit gelöschten Pinseln werden zu einfachen Konturen. Delete the graphic style “{name}”? Grafikstil „{name}“ löschen? Delete Theme Thema löschen Delete theme Thema löschen @@ -5596,6 +5594,11 @@ breakText Glyphs Glyphen Gap 4 Lücke 4 Dash 5 Strich 5 Gap 5 Lücke 5 + Delete the brush selection? Ausgewählte Pinsel löschen? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Ein oder mehrere Pinsel werden verwendet und können erst gelöscht werden, wenn ihre Konturen umgewandelt oder entfernt wurden. + Remove Strokes Konturen entfernen + Yes Ja + No Nein # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Anordnungswerkzeuge Arrange in Grid… In Raster anordnen… diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index e5ac83775..7c9b2fa5c 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -716,8 +716,6 @@ font-technology Variable Μεταβλητές Yes Ναι No Όχι Delete Tab Διαγραφή στηλοθέτη - Delete the brush “{name}”? Να διαγραφεί το πινέλο «{name}»; - Strokes using deleted brushes become plain strokes. Οι πινελιές που χρησιμοποιούν διαγραμμένα πινέλα γίνονται απλές πινελιές. Delete the graphic style “{name}”? Να διαγραφεί το στυλ γραφικών «{name}»; Delete Theme Διαγραφή θέματος Delete theme Διαγραφή θέματος @@ -5963,6 +5961,11 @@ breakText Glyphs Γλύφοι Gap 4 Διάκενο 4 Dash 5 Παύλα 5 Gap 5 Διάκενο 5 + Delete the brush selection? Να διαγραφούν τα επιλεγμένα πινέλα; + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Ένα ή περισσότερα πινέλα χρησιμοποιούνται και δεν μπορούν να διαγραφούν μέχρι να επεκταθούν ή να αφαιρεθούν τα περιγράμματά τους. + Remove Strokes Αφαίρεση περιγραμμάτων + Yes Ναι + No Όχι # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Εργαλεία διάταξης Arrange in Grid… Διάταξη σε πλέγμα… diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 367692be2..70e009d06 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -757,8 +757,6 @@ font-technology Variable Variables Yes Sí No No Delete Tab Eliminar tabulación - Delete the brush “{name}”? ¿Eliminar el pincel “{name}”? - Strokes using deleted brushes become plain strokes. Los trazos que usan pinceles eliminados se convierten en trazos simples. Delete the graphic style “{name}”? ¿Eliminar el estilo gráfico “{name}”? Delete Theme Eliminar tema Delete theme Eliminar tema @@ -5953,6 +5951,11 @@ breakText Glyphs Glifos Gap 4 Hueco 4 Dash 5 Guion 5 Gap 5 Hueco 5 + Delete the brush selection? ¿Eliminar los pinceles seleccionados? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Uno o más pinceles están en uso y no se pueden eliminar hasta expandir o quitar sus trazos. + Remove Strokes Quitar trazos + Yes Sí + No No # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Herramientas de organización Arrange in Grid… Organizar en cuadrícula… diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index d0b30760a..51e68665b 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -1532,8 +1532,6 @@ lighting Light Valo Reverse Gradient Käännä liukuväri Save to Swatches Tallenna värimalleihin Delete Graphic Style (Alt-click: without asking) Poista grafiikkatyyli (Alt-napsautus: kysymättä) - Delete the brush “{name}”? Poistetaanko sivellin ”{name}”? - Strokes using deleted brushes become plain strokes. Poistettuja siveltimiä käyttävät viivat muuttuvat tavallisiksi viivoiksi. Delete the graphic style “{name}”? Poistetaanko grafiikkatyyli ”{name}”? Delete these {n} graphic styles? Poistetaanko nämä {n} grafiikkatyyliä? Delete this {n} graphic style? Poistetaanko tämä {n} grafiikkatyyli? @@ -6041,6 +6039,11 @@ breakText Glyphs Merkit Gap 4 Väli 4 Dash 5 Viiva 5 Gap 5 Väli 5 + Delete the brush selection? Poistetaanko valitut siveltimet? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Yksi tai useampi sivellin on käytössä eikä niitä voi poistaa ennen kuin niiden viivat on laajennettu tai poistettu. + Remove Strokes Poista viivat + Yes Kyllä + No Ei # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Järjestelytyökalut Arrange in Grid… Järjestä ruudukkoon… diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index ab5fc9acd..0c355f478 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -759,8 +759,6 @@ font-technology Variable Variables Yes Oui No Non Delete Tab Supprimer la tabulation - Delete the brush “{name}”? Supprimer la forme « {name} » ? - Strokes using deleted brushes become plain strokes. Les contours utilisant des formes supprimées deviennent des contours simples. Delete the graphic style “{name}”? Supprimer le style graphique « {name} » ? Delete Theme Supprimer le thème Delete theme Supprimer le thème @@ -3703,7 +3701,6 @@ imageTrace Outline Contour @plural {n} item|{n} items {n} élément|{n} éléments @plural Color Table ({n} color)|Color Table ({n} colors) Table des couleurs ({n} couleur)|Table des couleurs ({n} couleurs) @plural Delete this {n} graphic style?|Delete these {n} graphic styles? Supprimer {n} style graphique ?|Supprimer ces {n} styles graphiques ? -@plural Delete this {n} brush?|Delete these {n} brushes? Supprimer {n} forme ?|Supprimer ces {n} formes ? @plural {n} Layer|{n} Layers {n} calque|{n} calques @plural {n} Object|{n} Objects {n} objet|{n} objets @plural {n} area highlighted|{n} areas highlighted {n} zone mise en évidence|{n} zones mises en évidence @@ -6009,6 +6006,11 @@ breakText Glyphs Glyphes Gap 4 Écart 4 Dash 5 Tiret 5 Gap 5 Écart 5 + Delete the brush selection? Supprimer les formes sélectionnées ? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Une ou plusieurs formes sont utilisées et ne peuvent pas être supprimées tant que leurs contours ne sont pas décomposés ou supprimés. + Remove Strokes Supprimer les contours + Yes Oui + No Non # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Outils de disposition Arrange in Grid… Disposer en grille… diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index e91e7dfe5..965e4ddb2 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -981,8 +981,6 @@ font-technology Variable Változó Yes Igen No Nem Delete Tab Tabulátor törlése - Delete the brush “{name}”? Törlöd ezt az ecsetet: „{name}”? - Strokes using deleted brushes become plain strokes. A törölt ecseteket használó körvonalak egyszerű körvonalakká válnak. Delete the graphic style “{name}”? Törlöd ezt a grafikai stílust: „{name}”? Delete the library “{name}”? Törlöd ezt a könyvtárat: „{name}”? Delete Theme Téma törlése @@ -5997,6 +5995,11 @@ breakText Glyphs Glifák Gap 4 Hézag 4 Dash 5 Vonal 5 Gap 5 Hézag 5 + Delete the brush selection? Törlöd a kijelölt ecseteket? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Egy vagy több ecset használatban van, és nem törölhető, amíg a körvonalait ki nem bontod vagy el nem távolítod. + Remove Strokes Körvonalak eltávolítása + Yes Igen + No Nem # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Elrendezőeszközök Arrange in Grid… Elrendezés rácsba… diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 265da6fbe..ebfdabf54 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -1472,8 +1472,6 @@ lighting Light Cahaya Reverse Gradient Balikkan gradien Save to Swatches Simpan ke swatch Delete Graphic Style (Alt-click: without asking) Hapus gaya grafis (Alt+klik: tanpa konfirmasi) - Delete the brush “{name}”? Hapus kuas “{name}”? - Strokes using deleted brushes become plain strokes. Goresan yang menggunakan kuas terhapus menjadi goresan biasa. Delete the graphic style “{name}”? Hapus gaya grafis “{name}”? Delete these {n} graphic styles? Hapus {n} gaya grafis ini? Delete this {n} graphic style? Hapus {n} gaya grafis ini? @@ -5915,6 +5913,11 @@ breakText Glyphs Glif Gap 4 Jarak 4 Dash 5 Garis 5 Gap 5 Jarak 5 + Delete the brush selection? Hapus kuas yang dipilih? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Satu atau beberapa kuas sedang digunakan dan tidak dapat dihapus sampai stroke-nya diperluas atau dihapus. + Remove Strokes Hapus Stroke + Yes Ya + No Tidak # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Alat penyusunan Arrange in Grid… Susun dalam grid… diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index af6874bbe..ffc95c4da 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -757,8 +757,6 @@ font-technology Variable Variabili Yes Sì No No Delete Tab Elimina tabulazione - Delete the brush “{name}”? Eliminare il pennello “{name}”? - Strokes using deleted brushes become plain strokes. I tracciati che usano pennelli eliminati diventano tracciati semplici. Delete the graphic style “{name}”? Eliminare lo stile grafico “{name}”? Delete Theme Elimina tema Delete theme Elimina tema @@ -5630,6 +5628,11 @@ breakText Glyphs Glifi Gap 4 Spazio 4 Dash 5 Tratto 5 Gap 5 Spazio 5 + Delete the brush selection? Eliminare i pennelli selezionati? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Uno o più pennelli sono in uso e non possono essere eliminati finché le tracce non vengono espanse o rimosse. + Remove Strokes Rimuovi tracce + Yes Sì + No No # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Strumenti di disposizione Arrange in Grid… Disponi in griglia… diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index f9ad60b87..754362ef5 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -1308,8 +1308,6 @@ font-technology Variable バリアブル Delete Transparency Flattener Preset 透明の分割・統合プリセットを削除 Delete Width Point 幅ポイントを削除 Delete Workspace ワークスペースを削除 - Delete the brush “{name}”? ブラシ「{name}」を削除しますか? - Strokes using deleted brushes become plain strokes. 削除したブラシを使用する線は通常の線になります。 Delete the graphic style “{name}”? グラフィックスタイル「{name}」を削除しますか? Delete theme テーマを削除 Delete this saved preset この保存済みプリセットを削除 @@ -5696,6 +5694,11 @@ breakText Glyphs 字形 Gap 4 間隔 4 Dash 5 線分 5 Gap 5 間隔 5 + Delete the brush selection? 選択したブラシを削除しますか? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. 使用中のブラシが含まれています。線を拡張または削除するまでブラシを削除できません。 + Remove Strokes 線を削除 + Yes はい + No いいえ # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools 配置ツール Arrange in Grid… グリッドに配置… diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 7f6eb84ba..b07dfd7fc 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -1389,8 +1389,6 @@ lighting Light სინათლე Reverse Gradient გრადიენტის შებრუნება Save to Swatches ფერის ნიმუშებში შენახვა Delete Graphic Style (Alt-click: without asking) გრაფიკული სტილის წაშლა (Alt-დაწკაპუნებით: დაუკითხავად) - Delete the brush “{name}”? წაიშალოს ფუნჯი „{name}“? - Strokes using deleted brushes become plain strokes. წაშლილი ფუნჯებით დახატული შტრიხები ჩვეულებრივ შტრიხებად იქცევა. Delete the graphic style “{name}”? წაიშალოს გრაფიკული სტილი „{name}“? Delete these {n} graphic styles? წაიშალოს ეს გრაფიკული სტილები ({n})? Delete this {n} graphic style? წაიშალოს ეს გრაფიკული სტილი ({n})? @@ -6000,6 +5998,11 @@ breakText Glyphs გლიფები Gap 4 შუალედი 4 Dash 5 ტირე 5 Gap 5 შუალედი 5 + Delete the brush selection? წაიშალოს არჩეული ფუნჯები? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. ერთი ან მეტი ფუნჯი გამოიყენება და მათი წაშლა შეუძლებელია, სანამ კონტურები არ გაიშლება ან არ მოიხსნება. + Remove Strokes კონტურების მოხსნა + Yes დიახ + No არა # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools განლაგების ხელსაწყოები Arrange in Grid… ბადეში განლაგება… diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index a64392ef3..e487667b5 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -1299,8 +1299,6 @@ font-technology Variable 가변 Delete Transparency Flattener Preset 투명도 병합 프리셋 삭제 Delete Width Point 너비 포인트 삭제 Delete Workspace 작업 영역 삭제 - Delete the brush “{name}”? 브러시 “{name}”을(를) 삭제하시겠습니까? - Strokes using deleted brushes become plain strokes. 삭제된 브러시를 사용한 선은 일반 선이 됩니다. Delete the graphic style “{name}”? 그래픽 스타일 “{name}”을(를) 삭제하시겠습니까? Delete theme 테마 삭제 Delete this saved preset 저장된 이 프리셋 삭제 @@ -5593,6 +5591,11 @@ breakText Glyphs 글리프 Gap 4 간격 4 Dash 5 대시 5 Gap 5 간격 5 + Delete the brush selection? 선택한 브러시를 삭제하시겠습니까? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. 하나 이상의 브러시가 사용 중이며 선을 확장하거나 제거할 때까지 삭제할 수 없습니다. + Remove Strokes 선 제거 + Yes 예 + No 아니요 # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools 배치 도구 Arrange in Grid… 격자로 배치… diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index ed254e2a1..71d7a6d73 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -1486,8 +1486,6 @@ lighting Light Licht Reverse Gradient Verloop omkeren Save to Swatches Opslaan in stalen Delete Graphic Style (Alt-click: without asking) Grafische stijl verwijderen (Alt-klik: zonder vragen) - Delete the brush “{name}”? Kwast „{name}” verwijderen? - Strokes using deleted brushes become plain strokes. Lijnen die verwijderde kwasten gebruiken, worden gewone lijnen. Delete the graphic style “{name}”? De grafische stijl „{name}” verwijderen? Delete these {n} graphic styles? Deze {n} grafische stijlen verwijderen? Delete this {n} graphic style? Deze {n} grafische stijl verwijderen? @@ -5959,6 +5957,11 @@ breakText Glyphs Glyphs Gap 4 Tussenruimte 4 Dash 5 Streepje 5 Gap 5 Tussenruimte 5 + Delete the brush selection? Geselecteerde kwasten verwijderen? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Een of meer kwasten zijn in gebruik en kunnen pas worden verwijderd als hun contouren zijn uitgebreid of verwijderd. + Remove Strokes Contouren verwijderen + Yes Ja + No Nee # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Schikgereedschappen Arrange in Grid… In raster schikken… diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index f2e5c5964..7a606131f 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -1472,8 +1472,6 @@ lighting Light Światło Reverse Gradient Odwróć gradient Save to Swatches Zapisz w próbkach Delete Graphic Style (Alt-click: without asking) Usuń styl graficzny (kliknięcie z Alt: bez pytania) - Delete the brush “{name}”? Usunąć pędzel „{name}”? - Strokes using deleted brushes become plain strokes. Obrysy używające usuniętych pędzli stają się zwykłymi obrysami. Delete the graphic style “{name}”? Usunąć styl graficzny „{name}”? Delete these {n} graphic styles? Usunąć te style graficzne ({n})? Delete this {n} graphic style? Usunąć ten styl graficzny ({n})? @@ -5866,6 +5864,11 @@ breakText Glyphs Glify Gap 4 Odstęp 4 Dash 5 Kreska 5 Gap 5 Odstęp 5 + Delete the brush selection? Usunąć zaznaczone pędzle? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Co najmniej jeden pędzel jest używany i nie można go usunąć, dopóki jego obrysy nie zostaną rozszerzone lub usunięte. + Remove Strokes Usuń obrysy + Yes Tak + No Nie # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Narzędzia układania Arrange in Grid… Ułóż w siatce… diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 4d39287c5..e1044cbbd 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -674,8 +674,6 @@ Delete Transparency Flattener Preset Excluir Predefinido de Achatamento de Transparência Delete Width Point Excluir Ponto de Largura Delete Workspace Excluir Espaço de Trabalho - Delete the brush “{name}”? Excluir o pincel “{name}”? - Strokes using deleted brushes become plain strokes. Traços que usam pincéis excluídos tornam-se traços simples. Delete the graphic style “{name}”? Excluir o estilo gráfico “{name}”? Delete theme Excluir tema Delete this saved preset Excluir este predefinido salvo @@ -5930,6 +5928,11 @@ breakText Glyphs Glifos Gap 4 Lacuna 4 Dash 5 Traço 5 Gap 5 Lacuna 5 + Delete the brush selection? Excluir os pincéis selecionados? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Um ou mais pincéis estão em uso e não podem ser excluídos até que seus traçados sejam expandidos ou removidos. + Remove Strokes Remover Traçados + Yes Sim + No Não # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Ferramentas de Organização Arrange in Grid… Organizar em Grade… diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 952171bbf..d9cede698 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -755,8 +755,6 @@ font-technology Variable Вариативные Yes Да No Нет Delete Tab Удалить табуляцию - Delete the brush “{name}”? Удалить кисть «{name}»? - Strokes using deleted brushes become plain strokes. Обводки, использующие удалённые кисти, становятся обычными обводками. Delete the graphic style “{name}”? Удалить графический стиль «{name}»? Delete Theme Удалить тему Delete theme Удалить тему @@ -5988,6 +5986,11 @@ breakText Glyphs Глифы Gap 4 Зазор 4 Dash 5 Штрих 5 Gap 5 Зазор 5 + Delete the brush selection? Удалить выбранные кисти? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Одна или несколько кистей используются и не могут быть удалены, пока их обводки не будут разобраны или убраны. + Remove Strokes Убрать обводки + Yes Да + No Нет # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Инструменты размещения Arrange in Grid… Разместить по сетке… diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 9f24f8e02..68239d409 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -744,8 +744,6 @@ font-technology Variable Variabla Yes Ja No Nej Delete Tab Radera tabb - Delete the brush “{name}”? Radera penseln ”{name}”? - Strokes using deleted brushes become plain strokes. Linjer som använder borttagna penslar blir vanliga linjer. Delete the graphic style “{name}”? Radera grafikstilen ”{name}”? Delete Theme Radera tema Delete theme Radera tema @@ -6063,6 +6061,11 @@ breakText Glyphs Glyfer Gap 4 Mellanrum 4 Dash 5 Streck 5 Gap 5 Mellanrum 5 + Delete the brush selection? Radera de valda penslarna? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. En eller flera penslar används och kan inte raderas förrän deras konturer har expanderats eller tagits bort. + Remove Strokes Ta bort konturer + Yes Ja + No Nej # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Ordningsverktyg Arrange in Grid… Ordna i rutnät… diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 91fd8143d..44cc14ba5 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -736,8 +736,6 @@ font-technology Variable Değişken Yes Evet No Hayır Delete Tab Sekmeyi Sil - Delete the brush “{name}”? “{name}” fırçası silinsin mi? - Strokes using deleted brushes become plain strokes. Silinen fırçaları kullanan konturlar düz konturlara dönüşür. Delete the graphic style “{name}”? “{name}” grafik stili silinsin mi? Delete Theme Temayı Sil Delete theme Temayı sil @@ -5968,6 +5966,11 @@ breakText Glyphs Glifler Gap 4 Boşluk 4 Dash 5 Çizgi 5 Gap 5 Boşluk 5 + Delete the brush selection? Seçili fırçalar silinsin mi? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Bir veya daha fazla fırça kullanılıyor ve konturları genişletilmeden veya kaldırılmadan silinemez. + Remove Strokes Konturları Kaldır + Yes Evet + No Hayır # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Düzenleme Araçları Arrange in Grid… Izgarada Düzenle… diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 750796afe..271b96793 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -751,8 +751,6 @@ font-technology Variable Варіативні Yes Так No Ні Delete Tab Видалити табуляцію - Delete the brush “{name}”? Видалити пензель «{name}»? - Strokes using deleted brushes become plain strokes. Обведення, що використовують видалені пензлі, стають звичайними обведеннями. Delete the graphic style “{name}”? Видалити графічний стиль «{name}»? Delete Theme Видалити тему Delete theme Видалити тему @@ -5610,6 +5608,11 @@ breakText Glyphs Гліфи Gap 4 Проміжок 4 Dash 5 Штрих 5 Gap 5 Проміжок 5 + Delete the brush selection? Видалити вибрані пензлі? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Один або кілька пензлів використовуються і не можуть бути видалені, доки їхні обведення не буде розібрано або забрано. + Remove Strokes Забрати обведення + Yes Так + No Ні # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Інструменти розміщення Arrange in Grid… Розмістити сіткою… diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 494b40265..66978c370 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -877,8 +877,6 @@ font-technology Variable Biến thiên Yes Có No Không Delete Tab Xóa tab - Delete the brush “{name}”? Xóa cọ “{name}”? - Strokes using deleted brushes become plain strokes. Các nét dùng cọ đã xóa trở thành nét thông thường. Delete the graphic style “{name}”? Xóa kiểu đồ họa “{name}”? Delete the library “{name}”? Xóa thư viện “{name}”? Delete Theme Xóa bộ màu @@ -5612,6 +5610,11 @@ breakText Glyphs Glyph Gap 4 Khoảng hở 4 Dash 5 Nét 5 Gap 5 Khoảng hở 5 + Delete the brush selection? Xóa các cọ đã chọn? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Một hoặc nhiều cọ đang được sử dụng và không thể xóa cho đến khi nét được mở rộng hoặc gỡ bỏ. + Remove Strokes Gỡ nét + Yes Có + No Không # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Công cụ sắp xếp Arrange in Grid… Sắp xếp theo lưới… diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 105fefd26..85e1ffd3d 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -700,8 +700,6 @@ Yes 是 No 否 Delete Tab 删除制表位 - Delete the brush “{name}”? 要删除画笔“{name}”吗? - Strokes using deleted brushes become plain strokes. 使用已删除画笔的描边会变成普通描边。 Delete the graphic style “{name}”? 要删除图形样式“{name}”吗? Delete Theme 删除主题 Delete theme 删除主题 @@ -5852,6 +5850,11 @@ breakText Glyphs 字形 Gap 4 间隔 4 Dash 5 虚线 5 Gap 5 间隔 5 + Delete the brush selection? 删除选中的画笔吗? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. 一个或多个画笔正在使用中,必须先扩展或移除其描边才能删除。 + Remove Strokes 移除描边 + Yes 是 + No 否 # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools 排列工具 Arrange in Grid… 按网格排列… diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 7ffb1831a..44e077e90 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -719,8 +719,6 @@ font-technology Variable 可變 Yes 是 No 否 Delete Tab 刪除定位點 - Delete the brush “{name}”? 要刪除筆刷「{name}」嗎? - Strokes using deleted brushes become plain strokes. 使用已刪除筆刷的筆畫會變成一般筆畫。 Delete the graphic style “{name}”? 要刪除繪圖樣式「{name}」嗎? Delete Theme 刪除主題 Delete theme 刪除主題 @@ -5649,6 +5647,11 @@ breakText Glyphs 字符 Gap 4 間隙 4 Dash 5 虛線 5 Gap 5 間隙 5 + Delete the brush selection? 要刪除選取的筆刷嗎? + One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. 一個或多個筆刷正在使用中,必須先擴展或移除其筆畫才能刪除。 + Remove Strokes 移除筆畫 + Yes 是 + No 否 # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools 排列工具 Arrange in Grid… 依格狀排列… diff --git a/crates/ui-egui/src/panels/brushes.rs b/crates/ui-egui/src/panels/brushes.rs index b73404730..279677527 100644 --- a/crates/ui-egui/src/panels/brushes.rs +++ b/crates/ui-egui/src/panels/brushes.rs @@ -204,9 +204,15 @@ fn run_on(app: &mut VectorcraftApp, id: &str, names: &[String]) { app.run(id, p).ok(); } -/// Delete `names` after asking, or immediately when the bottom button was Alt-clicked. +/// Delete `names` after asking: Yes or No when none of them is in use, else Remove Strokes or +/// Cancel. With `now` (Alt-click on the bottom button), brushes that are not in use go at once. fn delete(app: &mut VectorcraftApp, names: &[String], now: bool) { - if now { + let Ok(unused) = app.run("brush.unused", json!({})) else { + return; + }; + let unused = unused.get("names").and_then(Value::as_array).cloned().unwrap_or_default(); + let used = names.iter().any(|name| !unused.iter().any(|n| n.as_str() == Some(name))); + if now && !used { run_on(app, "brush.delete", names); return; } @@ -214,11 +220,7 @@ fn delete(app: &mut VectorcraftApp, names: &[String], now: bool) { [name] => json!({ "name": name }), _ => json!({ "names": names }), }; - let message = match names { - [name] => crate::i18n::fmt(tl!("Delete the brush “{name}”?"), &[("name", name)]), - _ => crate::i18n::tn(names.len() as u64, "Delete this {n} brush?", "Delete these {n} brushes?"), - }; - crate::dialogs::confirm::ask(app, &message, tl!("Strokes using deleted brushes become plain strokes."), "brush.delete", params); + crate::dialogs::brush_delete::ask(app, params, used); } /// The names in `list` in the order the panel shows them: by type in [`KINDS`] order, without the diff --git a/crates/ui-egui/src/panels/brushes/tests.rs b/crates/ui-egui/src/panels/brushes/tests.rs index 421c0162a..c4b794677 100644 --- a/crates/ui-egui/src/panels/brushes/tests.rs +++ b/crates/ui-egui/src/panels/brushes/tests.rs @@ -158,22 +158,25 @@ fn delete_button(ctx: &egui::Context, app: &mut VectorcraftApp, modifiers: egui: fn assert_delete_dialog(app: &VectorcraftApp, message: &str) { let d = app.ui.dialog.as_ref().expect("Delete Brush asks first"); - assert_eq!(d.kind, crate::dialogs::confirm::KIND); + assert_eq!(d.kind, crate::dialogs::brush_delete::KIND); assert_eq!(d.str("message"), message); - assert_eq!(d.str("detail"), "Strokes using deleted brushes become plain strokes."); + assert_eq!(d.bool("used"), message.starts_with("One or more")); } +/// Deleting several unused brushes asks one question about the selection, with no count in it. #[test] -fn deleting_five_brushes_uses_polish_many_form() { +fn deleting_five_brushes_uses_one_selection_question() { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 200, "height": 100})).unwrap(); + let five: Vec = names(&mut app).into_iter().take(5).collect(); + assert_eq!(five.len(), 5); let previous = crate::i18n::current(); let polish = crate::i18n::Lang::from_code("pl").unwrap(); crate::i18n::set_current(polish); - let mut app = VectorcraftApp::new(Session::new(), Default::default()); - let names: Vec = (1..=5).map(|n| format!("Brush {n}")).collect(); - delete(&mut app, &names, false); + delete(&mut app, &five, false); let message = app.ui.dialog.as_ref().map(|d| d.str("message")); crate::i18n::set_current(previous); - assert_eq!(message, Some("Usunąć 5 pędzli?".to_string())); + assert_eq!(message, Some("Usunąć zaznaczone pędzle?".to_string())); } /// Click the panel menu's item `label` (frames at `time`, `time + 0.5`). @@ -223,7 +226,7 @@ fn shift_and_command_clicks_select_brushes_for_delete_and_duplicate() { assert_eq!(undo_count(&app), before.1 + 1); // The bottom bar's last button, Delete Brush. delete_button(&ctx, &mut app, egui::Modifiers::NONE, 5.0); - assert_delete_dialog(&app, "Delete these 2 brushes?"); + assert_delete_dialog(&app, "One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed."); assert_eq!(names(&mut app), [before.0.clone(), copies.to_vec()].concat()); assert_eq!(brush_of(&app, rect).as_deref(), Some(three[0].as_str())); assert_eq!(undo_count(&app), before.1 + 1); @@ -263,7 +266,7 @@ fn selecting_other_art_ends_the_brush_multi_selection() { let out = frame_with(&ctx, &mut app, vec![], egui::Modifiers::NONE, 4.0, show); assert_eq!(lit_tiles(&out), [1]); menu_click(&ctx, &mut app, "Delete Brush", 5.0); - assert_delete_dialog(&app, &format!("Delete the brush “{}”?", three[1])); + assert_delete_dialog(&app, "One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed."); assert!(names(&mut app).contains(&three[1])); crate::dialogs::confirm(&mut app).unwrap(); let left = names(&mut app); @@ -332,7 +335,7 @@ fn select_all_unused_selects_the_brushes_no_stroke_paints_with() { let on: Vec = (0..tiles.len()).filter(|i| lit(&ctx, &out).contains(&tiles[*i])).collect(); assert_eq!(on, (0..tiles.len()).filter(|i| *i != 1).collect::>()); menu_click(&ctx, &mut app, "Delete Brush", 3.0); - assert_delete_dialog(&app, &format!("Delete these {} brushes?", list.len() - 1)); + assert_delete_dialog(&app, "Delete the brush selection?"); assert_eq!(names(&mut app).len(), list.len()); crate::dialogs::confirm(&mut app).unwrap(); assert_eq!(names(&mut app), [list[1].0.clone()]); @@ -349,7 +352,7 @@ fn delete_button_cancel_keeps_selected_brushes_strokes_and_history() { let (three, _) = select_three(&ctx, &mut app, rect); let before = (names(&mut app), brush_of(&app, rect), undo_count(&app)); delete_button(&ctx, &mut app, egui::Modifiers::NONE, 3.0); - assert_delete_dialog(&app, "Delete these 3 brushes?"); + assert_delete_dialog(&app, "One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed."); assert_eq!((names(&mut app), brush_of(&app, rect), undo_count(&app)), before); crate::dialogs::cancel(&mut app); assert!(app.ui.dialog.is_none()); @@ -364,7 +367,7 @@ fn delete_button_cancel_keeps_selected_brushes_strokes_and_history() { } #[test] -fn alt_delete_button_removes_selected_brushes_without_dialog() { +fn alt_delete_button_asks_when_a_selected_brush_is_used() { let mut app = VectorcraftApp::new(Session::new(), Default::default()); app.run("file.new", json!({"width": 200, "height": 100})).unwrap(); let rect = NodeId(app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 50, "height": 40})).unwrap()["id"].as_u64().unwrap()); @@ -373,16 +376,56 @@ fn alt_delete_button_removes_selected_brushes_without_dialog() { let (three, _) = select_three(&ctx, &mut app, rect); let before = undo_count(&app); delete_button(&ctx, &mut app, egui::Modifiers::NONE, 3.0); - assert_delete_dialog(&app, "Delete these 3 brushes?"); + assert_delete_dialog(&app, "One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed."); crate::dialogs::cancel(&mut app); delete_button(&ctx, &mut app, egui::Modifiers::ALT, 4.0); - assert!(app.ui.dialog.is_none()); + assert_delete_dialog(&app, "One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed."); + crate::dialogs::cancel(&mut app); let left = names(&mut app); - assert!(three.iter().all(|name| !left.contains(name))); - assert_eq!(brush_of(&app, rect), None); + assert!(three.iter().all(|name| left.contains(name))); + assert_eq!(brush_of(&app, rect).as_deref(), Some(three[0].as_str())); + assert_eq!(undo_count(&app), before); +} + +#[test] +fn alt_delete_button_deletes_unused_brush_without_a_question() { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 200, "height": 100})).unwrap(); + let ctx = egui::Context::default(); + ctx.enable_accesskit(); + let first = names(&mut app)[0].clone(); + let out = frame_with(&ctx, &mut app, vec![], egui::Modifiers::NONE, 0.0, show); + let tile = clickable(&out).into_iter().find(|(label, _)| label.as_deref() == Some(first.as_str())).expect("brush tile").1.center(); + click(&ctx, &mut app, tile, egui::Modifiers::NONE, 1.0, show); + let before = undo_count(&app); + delete_button(&ctx, &mut app, egui::Modifiers::ALT, 2.0); + assert!(app.ui.dialog.is_none()); + assert!(!names(&mut app).contains(&first)); assert_eq!(undo_count(&app), before + 1); } +#[test] +fn menu_delete_used_brush_requires_remove_strokes_or_cancel() { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 200, "height": 100})).unwrap(); + let rect = NodeId(app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 50, "height": 40})).unwrap()["id"].as_u64().unwrap()); + let ctx = egui::Context::default(); + ctx.enable_accesskit(); + let (three, _) = select_three(&ctx, &mut app, rect); + let before = undo_count(&app); + menu_click(&ctx, &mut app, "Delete Brush", 3.0); + assert_delete_dialog(&app, "One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed."); + crate::dialogs::cancel(&mut app); + assert_eq!(undo_count(&app), before); + assert_eq!(brush_of(&app, rect).as_deref(), Some(three[0].as_str())); + menu_click(&ctx, &mut app, "Delete Brush", 4.0); + crate::dialogs::confirm(&mut app).unwrap(); + assert_eq!(undo_count(&app), before + 1); + assert_eq!(brush_of(&app, rect), None); + assert!(app.session.active().unwrap().doc.node(rect).unwrap().appearance.stroke().is_some()); + assert!(three.iter().all(|name| !names(&mut app).contains(name))); +} + #[test] fn art_dropped_on_the_panel_becomes_an_art_brush_and_a_brush_drags_out() { let mut app = VectorcraftApp::new(Session::new(), Default::default()); diff --git a/docs/mcp.md b/docs/mcp.md index 6f342c98c..1f843271e 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1557,8 +1557,10 @@ already walks Image Trace. Short agent entry points: name they are given, as `symbol.options` trims `newName`; a blank one gives "New Symbol" or " copy". - The Brushes panel menu's Select All Unused: `brush.unused` (a query) lists the brushes no stroke paints with, in library order, and the panel selects them. Strokes in the art (opacity masks included), symbols, graph designs, - pattern tiles and graphic styles count, and so do the strokes in the art of a brush that is used. The art of a brush - that is not used does not count, so a brush whose own art is the only art that paints with it is listed. + pattern tiles (with the tiles that pattern editing's Cancel puts back) and graphic styles count, and so do the + strokes in the art of a brush that is used. The art of a brush that is not used does not count, so a brush whose own + art is the only art that paints with it is listed. The panel's Delete Brush asks Yes/No when every brush it deletes + is unused, and offers Remove Strokes or Cancel when one of them is in use. - Brushes: `brush.list`, `brush.get {name}`, `brush.apply {name, ids?}`, `brush.new {type, name?, params?, ids?}`, `brush.setCurrent {name}`, `brush.options {name, params?, newName?}`, `brush.delete {name} | {names}`, `brush.duplicate {name, newName?} | {names}`, `brush.freehand`, `object.expandBrush {ids?}`. `brush.new`, diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index ab9b96f4b..a03581528 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -962,7 +962,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur Hue Shift set by `brush.new` or `brush.options` without a key color takes the color the art's fills and strokes use most, as Brush Options already offers it, following the Brushes page, where the key color defaults to the color that stands out most in the art (). The page does not state how prominence is measured. Counting the fills and strokes that use each solid color, with the first one found winning a tie and black for art with no solid color, is VectorCraft's own rule. A `brush.options` edit that gives only the method keeps the brush's key color, and one that gives only an art brush's start guide keeps its end guide. Evidence: `tests_brushsym::hue_shift_without_a_key_takes_the_most_used_art_color`, `tests_brushsym::art_brush_options_keep_the_scale_fields_an_edit_leaves_out`. Bristle Brush Options and `brush.new` take a bristle brush name of at most 31 characters, as the Brushes page states for the Bristle Brush Options. The Name field stops taking characters at 31, and `brush.new` and `brush.options` refuse a longer new name with an error that names the limit. The page does not say how the limit counts characters or what happens to longer names already saved; counting characters and the number added to a taken name, keeping longer saved names, and leaving `brush.duplicate` unlimited are VectorCraft's own rules. A bristle brush that a document or a saved file already holds under a longer name keeps it, and the other brush types take a name of any length. Test: `bristle_brush_names_have_at_most_31_characters` in `tests/brushsym.rs`. Public reference: [Brushes](https://web.archive.org/web/20241230205225/https://helpx.adobe.com/illustrator/using/brushes.html) (archived copy). In the Brushes panel, Shift-click selects a range of brushes and Ctrl/Cmd-click adds or removes one. Delete Brush and Duplicate Brush then act on all of them (`brush.delete {names}`, `brush.duplicate {names}`). - The bottom Delete Brush button and the panel menu ask before deleting; Alt-click (Option-click on macOS) on the button deletes without asking. + The Brushes panel's Delete Brush button and panel menu item ask "Delete the brush selection?" with Yes and No when none of the brushes is in use. Alt-click (Option-click on macOS) on the button deletes them without asking, as the [Default keyboard shortcuts](https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html) page lists ("Delete without confirmation (except for Layers panel)"). When a stroke uses one of the brushes, the button, Alt-click and the menu item all ask with Remove Strokes and Cancel; Remove Strokes deletes the brushes and the strokes that used them become plain strokes. Tests: `panels::brushes::tests`, `dialogs::brush_delete::tests`. Document Info has a Brushes category after Graphic Styles. It lists the Brushes panel's brushes, or with Selection Only it lists the brushes that the selected objects' strokes use. The Document Info report and Package's report list them too (`document.info {category: "brushes"}`, `brushNames`). Document Info has a Repeat Objects category after Embedded Images. It lists each radial, grid and mirror Repeat object by name with its kind and the number of instances it makes. For a grid it gives the rows and columns instead, followed by the number of instances it draws when that is fewer. With Selection Only it lists the Repeat objects in the selection. The Document Info report and Package's report list them too (`document.info {category: "repeats"}`, `repeatObjects`). The Brushes panel menu's Select All Unused selects the brushes that are not used in the document, as the [Brushes](https://web.archive.org/web/20241230205225/https://helpx.adobe.com/illustrator/using/brushes.html) page (archived copy) describes. A brush counts as used when a stroke paints with it in the art (opacity masks included), in symbols, graph designs, pattern tiles or graphic styles, or in the art of a used brush (`brush.unused`). From 3937473e54b40ecde00826fae336f7fb9d71ec7f Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 30 Oct 2026 22:11:51 -0700 Subject: [PATCH 5/9] Brushes: the Delete Brush question for brushes in use no longer mentions expanding strokes The dialog offers Remove Strokes and Cancel, so the question asks only about taking the brushes off the strokes. Both questions are reworded in every catalog. --- crates/ui-egui/src/dialogs/brush_delete.rs | 4 ++-- crates/ui-egui/src/i18n/bg.tsv | 4 ++-- crates/ui-egui/src/i18n/bs.tsv | 4 ++-- crates/ui-egui/src/i18n/ca.tsv | 4 ++-- crates/ui-egui/src/i18n/cs.tsv | 4 ++-- crates/ui-egui/src/i18n/da.tsv | 4 ++-- crates/ui-egui/src/i18n/de.tsv | 4 ++-- crates/ui-egui/src/i18n/el.tsv | 4 ++-- crates/ui-egui/src/i18n/es.tsv | 4 ++-- crates/ui-egui/src/i18n/fi.tsv | 4 ++-- crates/ui-egui/src/i18n/fr.tsv | 4 ++-- crates/ui-egui/src/i18n/hu.tsv | 4 ++-- crates/ui-egui/src/i18n/id.tsv | 4 ++-- crates/ui-egui/src/i18n/it.tsv | 4 ++-- crates/ui-egui/src/i18n/ja.tsv | 4 ++-- crates/ui-egui/src/i18n/ka.tsv | 4 ++-- crates/ui-egui/src/i18n/ko.tsv | 4 ++-- crates/ui-egui/src/i18n/nl.tsv | 4 ++-- crates/ui-egui/src/i18n/pl.tsv | 4 ++-- crates/ui-egui/src/i18n/pt-br.tsv | 4 ++-- crates/ui-egui/src/i18n/ru.tsv | 4 ++-- crates/ui-egui/src/i18n/sv.tsv | 4 ++-- crates/ui-egui/src/i18n/tr.tsv | 4 ++-- crates/ui-egui/src/i18n/uk.tsv | 4 ++-- crates/ui-egui/src/i18n/vi.tsv | 4 ++-- crates/ui-egui/src/i18n/zh-hans.tsv | 4 ++-- crates/ui-egui/src/i18n/zh-hant.tsv | 4 ++-- crates/ui-egui/src/panels/brushes/tests.rs | 19 +++++++++++-------- docs/target-app-parity.md | 2 +- 29 files changed, 66 insertions(+), 63 deletions(-) diff --git a/crates/ui-egui/src/dialogs/brush_delete.rs b/crates/ui-egui/src/dialogs/brush_delete.rs index 9488d14be..ee4d6c964 100644 --- a/crates/ui-egui/src/dialogs/brush_delete.rs +++ b/crates/ui-egui/src/dialogs/brush_delete.rs @@ -21,9 +21,9 @@ pub(super) const SPEC: DialogSpec = /// Ask whether to delete the brushes `params` names (`used`: one of them is in use). pub fn ask(app: &mut VectorcraftApp, params: Value, used: bool) { let message = if used { - tl!("One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed.") + tl!("Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes?") } else { - tl!("Delete the brush selection?") + tl!("Delete the selected brushes?") }; app.ui.dialog = Some(Dialog::new(KIND, json!({"params": params, "used": used, "message": message}))); } diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index e423aab1a..43cef9353 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -5899,8 +5899,8 @@ breakText Glyphs Глифи Gap 4 Разстояние 4 Dash 5 Тире 5 Gap 5 Разстояние 5 - Delete the brush selection? Да се изтрият избраните четки? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Една или повече от четките се използват и не могат да бъдат изтрити, докато щрихите им не бъдат разширени или премахнати. + Delete the selected brushes? Да се изтрият избраните четки? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Щрихи използват една или повече от тези четки. Да се премахнат ли четките от тези щрихи и да се изтрият четките? Remove Strokes Премахване на щрихи Yes Да No Не diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 6b4851468..0deb3e7c3 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -5931,8 +5931,8 @@ shape Open Otvoren @msg `follow` must be "average", "a" or "b" `follow` mora biti "average", "a" ili "b" @msg the paths have nothing to merge there putanje tu nemaju šta spojiti @msg the path is locked or hidden putanja je zaključana ili skrivena - Delete the brush selection? Izbrisati odabrane četkice? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Jedna ili više četkica se koristi i ne mogu se izbrisati dok se njihovi potezi ne prošire ili uklone. + Delete the selected brushes? Izbrisati odabrane četkice? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Potezi koriste jednu ili više ovih četkica. Ukloniti četkice s tih poteza i izbrisati četkice? Remove Strokes Ukloni poteze Yes Da No Ne diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 970625ac0..a83e611a3 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -5999,8 +5999,8 @@ breakText Glyphs Glifs Gap 4 Separació 4 Dash 5 Guió 5 Gap 5 Separació 5 - Delete the brush selection? Voleu suprimir la selecció de pinzells? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Un o més pinzells estan en ús i no es poden suprimir fins que els traços s’expandeixin o s’eliminin. + Delete the selected brushes? Voleu suprimir els pinzells seleccionats? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Hi ha traços que fan servir un o més d’aquests pinzells. Voleu treure els pinzells d’aquests traços i suprimir els pinzells? Remove Strokes Elimina els traços Yes Sí No No diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index bc8c6b09b..6fac8c558 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -6008,8 +6008,8 @@ breakText Glyphs Glyfy Gap 4 Mezera 4 Dash 5 Čárka 5 Gap 5 Mezera 5 - Delete the brush selection? Odstranit vybrané štětce? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Jeden nebo více štětců se používá a nelze je odstranit, dokud jejich tahy nebudou rozloženy nebo odebrány. + Delete the selected brushes? Odstranit vybrané štětce? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Tahy používají jeden nebo více z těchto štětců. Odebrat štětce z těchto tahů a odstranit štětce? Remove Strokes Odebrat tahy Yes Ano No Ne diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index fc45ef6e5..ef3b48df5 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -5913,8 +5913,8 @@ breakText Glyphs Glyffer Gap 4 Mellemrum 4 Dash 5 Streg 5 Gap 5 Mellemrum 5 - Delete the brush selection? Slet de valgte pensler? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. En eller flere pensler er i brug og kan ikke slettes, før deres streger er udvidet eller fjernet. + Delete the selected brushes? Slet de valgte pensler? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Streger bruger en eller flere af disse pensler. Fjern penslerne fra stregerne, og slet penslerne? Remove Strokes Fjern streger Yes Ja No Nej diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index a36a57825..9028735e0 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -5594,8 +5594,8 @@ breakText Glyphs Glyphen Gap 4 Lücke 4 Dash 5 Strich 5 Gap 5 Lücke 5 - Delete the brush selection? Ausgewählte Pinsel löschen? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Ein oder mehrere Pinsel werden verwendet und können erst gelöscht werden, wenn ihre Konturen umgewandelt oder entfernt wurden. + Delete the selected brushes? Ausgewählte Pinsel löschen? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Konturen verwenden einen oder mehrere dieser Pinsel. Pinsel von diesen Konturen entfernen und die Pinsel löschen? Remove Strokes Konturen entfernen Yes Ja No Nein diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 7c9b2fa5c..b8bd5f396 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -5961,8 +5961,8 @@ breakText Glyphs Γλύφοι Gap 4 Διάκενο 4 Dash 5 Παύλα 5 Gap 5 Διάκενο 5 - Delete the brush selection? Να διαγραφούν τα επιλεγμένα πινέλα; - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Ένα ή περισσότερα πινέλα χρησιμοποιούνται και δεν μπορούν να διαγραφούν μέχρι να επεκταθούν ή να αφαιρεθούν τα περιγράμματά τους. + Delete the selected brushes? Να διαγραφούν τα επιλεγμένα πινέλα; + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Περιγράμματα χρησιμοποιούν ένα ή περισσότερα από αυτά τα πινέλα. Να αφαιρεθούν τα πινέλα από αυτά τα περιγράμματα και να διαγραφούν τα πινέλα; Remove Strokes Αφαίρεση περιγραμμάτων Yes Ναι No Όχι diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 70e009d06..ac1e149df 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -5951,8 +5951,8 @@ breakText Glyphs Glifos Gap 4 Hueco 4 Dash 5 Guion 5 Gap 5 Hueco 5 - Delete the brush selection? ¿Eliminar los pinceles seleccionados? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Uno o más pinceles están en uso y no se pueden eliminar hasta expandir o quitar sus trazos. + Delete the selected brushes? ¿Eliminar los pinceles seleccionados? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Algunos trazos usan uno o más de estos pinceles. ¿Quitar los pinceles de esos trazos y eliminar los pinceles? Remove Strokes Quitar trazos Yes Sí No No diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 51e68665b..13107e11e 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -6039,8 +6039,8 @@ breakText Glyphs Merkit Gap 4 Väli 4 Dash 5 Viiva 5 Gap 5 Väli 5 - Delete the brush selection? Poistetaanko valitut siveltimet? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Yksi tai useampi sivellin on käytössä eikä niitä voi poistaa ennen kuin niiden viivat on laajennettu tai poistettu. + Delete the selected brushes? Poistetaanko valitut siveltimet? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Viivat käyttävät yhtä tai useampaa näistä siveltimistä. Irrotetaanko siveltimet näistä viivoista ja poistetaanko siveltimet? Remove Strokes Poista viivat Yes Kyllä No Ei diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 0c355f478..f80a70246 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -6006,8 +6006,8 @@ breakText Glyphs Glyphes Gap 4 Écart 4 Dash 5 Tiret 5 Gap 5 Écart 5 - Delete the brush selection? Supprimer les formes sélectionnées ? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Une ou plusieurs formes sont utilisées et ne peuvent pas être supprimées tant que leurs contours ne sont pas décomposés ou supprimés. + Delete the selected brushes? Supprimer les formes sélectionnées ? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Des contours utilisent une ou plusieurs de ces formes. Retirer les formes de ces contours et supprimer les formes ? Remove Strokes Supprimer les contours Yes Oui No Non diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 965e4ddb2..3e72e0c39 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -5995,8 +5995,8 @@ breakText Glyphs Glifák Gap 4 Hézag 4 Dash 5 Vonal 5 Gap 5 Hézag 5 - Delete the brush selection? Törlöd a kijelölt ecseteket? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Egy vagy több ecset használatban van, és nem törölhető, amíg a körvonalait ki nem bontod vagy el nem távolítod. + Delete the selected brushes? Törlöd a kijelölt ecseteket? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Körvonalak használnak egyet vagy többet ezek közül az ecsetek közül. Leveszed az ecseteket ezekről a körvonalakról, és törlöd az ecseteket? Remove Strokes Körvonalak eltávolítása Yes Igen No Nem diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index ebfdabf54..00bbfac31 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -5913,8 +5913,8 @@ breakText Glyphs Glif Gap 4 Jarak 4 Dash 5 Garis 5 Gap 5 Jarak 5 - Delete the brush selection? Hapus kuas yang dipilih? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Satu atau beberapa kuas sedang digunakan dan tidak dapat dihapus sampai stroke-nya diperluas atau dihapus. + Delete the selected brushes? Hapus kuas yang dipilih? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Stroke menggunakan satu atau beberapa kuas ini. Lepaskan kuas dari stroke tersebut dan hapus kuasnya? Remove Strokes Hapus Stroke Yes Ya No Tidak diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index ffc95c4da..81b4ec79f 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -5628,8 +5628,8 @@ breakText Glyphs Glifi Gap 4 Spazio 4 Dash 5 Tratto 5 Gap 5 Spazio 5 - Delete the brush selection? Eliminare i pennelli selezionati? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Uno o più pennelli sono in uso e non possono essere eliminati finché le tracce non vengono espanse o rimosse. + Delete the selected brushes? Eliminare i pennelli selezionati? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Alcune tracce usano uno o più di questi pennelli. Rimuovere i pennelli da queste tracce ed eliminare i pennelli? Remove Strokes Rimuovi tracce Yes Sì No No diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 754362ef5..3064294fd 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -5694,8 +5694,8 @@ breakText Glyphs 字形 Gap 4 間隔 4 Dash 5 線分 5 Gap 5 間隔 5 - Delete the brush selection? 選択したブラシを削除しますか? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. 使用中のブラシが含まれています。線を拡張または削除するまでブラシを削除できません。 + Delete the selected brushes? 選択したブラシを削除しますか? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? これらのブラシの 1 つ以上が線で使われています。それらの線からブラシを外して、ブラシを削除しますか? Remove Strokes 線を削除 Yes はい No いいえ diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index b07dfd7fc..2d65308cb 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -5998,8 +5998,8 @@ breakText Glyphs გლიფები Gap 4 შუალედი 4 Dash 5 ტირე 5 Gap 5 შუალედი 5 - Delete the brush selection? წაიშალოს არჩეული ფუნჯები? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. ერთი ან მეტი ფუნჯი გამოიყენება და მათი წაშლა შეუძლებელია, სანამ კონტურები არ გაიშლება ან არ მოიხსნება. + Delete the selected brushes? წაიშალოს არჩეული ფუნჯები? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? კონტურები იყენებს ამ ფუნჯებიდან ერთს ან მეტს. მოიხსნას ფუნჯები ამ კონტურებიდან და წაიშალოს ფუნჯები? Remove Strokes კონტურების მოხსნა Yes დიახ No არა diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index e487667b5..e9fa809c2 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -5591,8 +5591,8 @@ breakText Glyphs 글리프 Gap 4 간격 4 Dash 5 대시 5 Gap 5 간격 5 - Delete the brush selection? 선택한 브러시를 삭제하시겠습니까? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. 하나 이상의 브러시가 사용 중이며 선을 확장하거나 제거할 때까지 삭제할 수 없습니다. + Delete the selected brushes? 선택한 브러시를 삭제하시겠습니까? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? 선에서 이 브러시 중 하나 이상을 사용합니다. 해당 선에서 브러시를 제거하고 브러시를 삭제하시겠습니까? Remove Strokes 선 제거 Yes 예 No 아니요 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 71d7a6d73..2fdb5d58b 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -5957,8 +5957,8 @@ breakText Glyphs Glyphs Gap 4 Tussenruimte 4 Dash 5 Streepje 5 Gap 5 Tussenruimte 5 - Delete the brush selection? Geselecteerde kwasten verwijderen? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Een of meer kwasten zijn in gebruik en kunnen pas worden verwijderd als hun contouren zijn uitgebreid of verwijderd. + Delete the selected brushes? Geselecteerde kwasten verwijderen? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Contouren gebruiken een of meer van deze kwasten. De kwasten van deze contouren halen en de kwasten verwijderen? Remove Strokes Contouren verwijderen Yes Ja No Nee diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 7a606131f..73117d2fc 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -5864,8 +5864,8 @@ breakText Glyphs Glify Gap 4 Odstęp 4 Dash 5 Kreska 5 Gap 5 Odstęp 5 - Delete the brush selection? Usunąć zaznaczone pędzle? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Co najmniej jeden pędzel jest używany i nie można go usunąć, dopóki jego obrysy nie zostaną rozszerzone lub usunięte. + Delete the selected brushes? Usunąć zaznaczone pędzle? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Obrysy używają co najmniej jednego z tych pędzli. Zdjąć pędzle z tych obrysów i usunąć pędzle? Remove Strokes Usuń obrysy Yes Tak No Nie diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index e1044cbbd..b2282cb81 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -5928,8 +5928,8 @@ breakText Glyphs Glifos Gap 4 Lacuna 4 Dash 5 Traço 5 Gap 5 Lacuna 5 - Delete the brush selection? Excluir os pincéis selecionados? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Um ou mais pincéis estão em uso e não podem ser excluídos até que seus traçados sejam expandidos ou removidos. + Delete the selected brushes? Excluir os pincéis selecionados? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Traçados usam um ou mais destes pincéis. Remover os pincéis desses traçados e excluir os pincéis? Remove Strokes Remover Traçados Yes Sim No Não diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index d9cede698..a25e32e22 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -5986,8 +5986,8 @@ breakText Glyphs Глифы Gap 4 Зазор 4 Dash 5 Штрих 5 Gap 5 Зазор 5 - Delete the brush selection? Удалить выбранные кисти? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Одна или несколько кистей используются и не могут быть удалены, пока их обводки не будут разобраны или убраны. + Delete the selected brushes? Удалить выбранные кисти? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Обводки используют одну или несколько из этих кистей. Убрать кисти с этих обводок и удалить кисти? Remove Strokes Убрать обводки Yes Да No Нет diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 68239d409..7075d1cd0 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -6061,8 +6061,8 @@ breakText Glyphs Glyfer Gap 4 Mellanrum 4 Dash 5 Streck 5 Gap 5 Mellanrum 5 - Delete the brush selection? Radera de valda penslarna? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. En eller flera penslar används och kan inte raderas förrän deras konturer har expanderats eller tagits bort. + Delete the selected brushes? Radera de valda penslarna? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Konturer använder en eller flera av de här penslarna. Ta bort penslarna från konturerna och radera penslarna? Remove Strokes Ta bort konturer Yes Ja No Nej diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 44cc14ba5..65679691a 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -5966,8 +5966,8 @@ breakText Glyphs Glifler Gap 4 Boşluk 4 Dash 5 Çizgi 5 Gap 5 Boşluk 5 - Delete the brush selection? Seçili fırçalar silinsin mi? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Bir veya daha fazla fırça kullanılıyor ve konturları genişletilmeden veya kaldırılmadan silinemez. + Delete the selected brushes? Seçili fırçalar silinsin mi? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Konturlar bu fırçalardan birini veya daha fazlasını kullanıyor. Fırçalar bu konturlardan kaldırılsın ve fırçalar silinsin mi? Remove Strokes Konturları Kaldır Yes Evet No Hayır diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 271b96793..7229a24af 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -5608,8 +5608,8 @@ breakText Glyphs Гліфи Gap 4 Проміжок 4 Dash 5 Штрих 5 Gap 5 Проміжок 5 - Delete the brush selection? Видалити вибрані пензлі? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Один або кілька пензлів використовуються і не можуть бути видалені, доки їхні обведення не буде розібрано або забрано. + Delete the selected brushes? Видалити вибрані пензлі? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Обведення використовують один або кілька з цих пензлів. Забрати пензлі з цих обведень і видалити пензлі? Remove Strokes Забрати обведення Yes Так No Ні diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 66978c370..7e5393289 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -5610,8 +5610,8 @@ breakText Glyphs Glyph Gap 4 Khoảng hở 4 Dash 5 Nét 5 Gap 5 Khoảng hở 5 - Delete the brush selection? Xóa các cọ đã chọn? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. Một hoặc nhiều cọ đang được sử dụng và không thể xóa cho đến khi nét được mở rộng hoặc gỡ bỏ. + Delete the selected brushes? Xóa các cọ đã chọn? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Có nét đang dùng một hoặc nhiều cọ này. Gỡ cọ khỏi các nét đó và xóa cọ? Remove Strokes Gỡ nét Yes Có No Không diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 85e1ffd3d..5f0b5adce 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -5850,8 +5850,8 @@ breakText Glyphs 字形 Gap 4 间隔 4 Dash 5 虚线 5 Gap 5 间隔 5 - Delete the brush selection? 删除选中的画笔吗? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. 一个或多个画笔正在使用中,必须先扩展或移除其描边才能删除。 + Delete the selected brushes? 删除选中的画笔吗? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? 有描边使用了其中一个或多个画笔。要从这些描边移除画笔并删除画笔吗? Remove Strokes 移除描边 Yes 是 No 否 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 44e077e90..65e66a36e 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -5647,8 +5647,8 @@ breakText Glyphs 字符 Gap 4 間隙 4 Dash 5 虛線 5 Gap 5 間隙 5 - Delete the brush selection? 要刪除選取的筆刷嗎? - One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed. 一個或多個筆刷正在使用中,必須先擴展或移除其筆畫才能刪除。 + Delete the selected brushes? 要刪除選取的筆刷嗎? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? 有筆畫使用了其中一個或多個筆刷。要從這些筆畫移除筆刷並刪除筆刷嗎? Remove Strokes 移除筆畫 Yes 是 No 否 diff --git a/crates/ui-egui/src/panels/brushes/tests.rs b/crates/ui-egui/src/panels/brushes/tests.rs index c4b794677..0aef4fb63 100644 --- a/crates/ui-egui/src/panels/brushes/tests.rs +++ b/crates/ui-egui/src/panels/brushes/tests.rs @@ -160,9 +160,12 @@ fn assert_delete_dialog(app: &VectorcraftApp, message: &str) { let d = app.ui.dialog.as_ref().expect("Delete Brush asks first"); assert_eq!(d.kind, crate::dialogs::brush_delete::KIND); assert_eq!(d.str("message"), message); - assert_eq!(d.bool("used"), message.starts_with("One or more")); + assert_eq!(d.bool("used"), message == IN_USE); } +/// The Delete Brush question when a stroke uses one of the brushes. +const IN_USE: &str = "Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes?"; + /// Deleting several unused brushes asks one question about the selection, with no count in it. #[test] fn deleting_five_brushes_uses_one_selection_question() { @@ -226,7 +229,7 @@ fn shift_and_command_clicks_select_brushes_for_delete_and_duplicate() { assert_eq!(undo_count(&app), before.1 + 1); // The bottom bar's last button, Delete Brush. delete_button(&ctx, &mut app, egui::Modifiers::NONE, 5.0); - assert_delete_dialog(&app, "One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed."); + assert_delete_dialog(&app, IN_USE); assert_eq!(names(&mut app), [before.0.clone(), copies.to_vec()].concat()); assert_eq!(brush_of(&app, rect).as_deref(), Some(three[0].as_str())); assert_eq!(undo_count(&app), before.1 + 1); @@ -266,7 +269,7 @@ fn selecting_other_art_ends_the_brush_multi_selection() { let out = frame_with(&ctx, &mut app, vec![], egui::Modifiers::NONE, 4.0, show); assert_eq!(lit_tiles(&out), [1]); menu_click(&ctx, &mut app, "Delete Brush", 5.0); - assert_delete_dialog(&app, "One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed."); + assert_delete_dialog(&app, IN_USE); assert!(names(&mut app).contains(&three[1])); crate::dialogs::confirm(&mut app).unwrap(); let left = names(&mut app); @@ -335,7 +338,7 @@ fn select_all_unused_selects_the_brushes_no_stroke_paints_with() { let on: Vec = (0..tiles.len()).filter(|i| lit(&ctx, &out).contains(&tiles[*i])).collect(); assert_eq!(on, (0..tiles.len()).filter(|i| *i != 1).collect::>()); menu_click(&ctx, &mut app, "Delete Brush", 3.0); - assert_delete_dialog(&app, "Delete the brush selection?"); + assert_delete_dialog(&app, "Delete the selected brushes?"); assert_eq!(names(&mut app).len(), list.len()); crate::dialogs::confirm(&mut app).unwrap(); assert_eq!(names(&mut app), [list[1].0.clone()]); @@ -352,7 +355,7 @@ fn delete_button_cancel_keeps_selected_brushes_strokes_and_history() { let (three, _) = select_three(&ctx, &mut app, rect); let before = (names(&mut app), brush_of(&app, rect), undo_count(&app)); delete_button(&ctx, &mut app, egui::Modifiers::NONE, 3.0); - assert_delete_dialog(&app, "One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed."); + assert_delete_dialog(&app, IN_USE); assert_eq!((names(&mut app), brush_of(&app, rect), undo_count(&app)), before); crate::dialogs::cancel(&mut app); assert!(app.ui.dialog.is_none()); @@ -376,10 +379,10 @@ fn alt_delete_button_asks_when_a_selected_brush_is_used() { let (three, _) = select_three(&ctx, &mut app, rect); let before = undo_count(&app); delete_button(&ctx, &mut app, egui::Modifiers::NONE, 3.0); - assert_delete_dialog(&app, "One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed."); + assert_delete_dialog(&app, IN_USE); crate::dialogs::cancel(&mut app); delete_button(&ctx, &mut app, egui::Modifiers::ALT, 4.0); - assert_delete_dialog(&app, "One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed."); + assert_delete_dialog(&app, IN_USE); crate::dialogs::cancel(&mut app); let left = names(&mut app); assert!(three.iter().all(|name| left.contains(name))); @@ -414,7 +417,7 @@ fn menu_delete_used_brush_requires_remove_strokes_or_cancel() { let (three, _) = select_three(&ctx, &mut app, rect); let before = undo_count(&app); menu_click(&ctx, &mut app, "Delete Brush", 3.0); - assert_delete_dialog(&app, "One or more of the brushes are in use and cannot be deleted until their strokes are expanded or removed."); + assert_delete_dialog(&app, IN_USE); crate::dialogs::cancel(&mut app); assert_eq!(undo_count(&app), before); assert_eq!(brush_of(&app, rect).as_deref(), Some(three[0].as_str())); diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index a03581528..c53382a21 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -962,7 +962,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur Hue Shift set by `brush.new` or `brush.options` without a key color takes the color the art's fills and strokes use most, as Brush Options already offers it, following the Brushes page, where the key color defaults to the color that stands out most in the art (). The page does not state how prominence is measured. Counting the fills and strokes that use each solid color, with the first one found winning a tie and black for art with no solid color, is VectorCraft's own rule. A `brush.options` edit that gives only the method keeps the brush's key color, and one that gives only an art brush's start guide keeps its end guide. Evidence: `tests_brushsym::hue_shift_without_a_key_takes_the_most_used_art_color`, `tests_brushsym::art_brush_options_keep_the_scale_fields_an_edit_leaves_out`. Bristle Brush Options and `brush.new` take a bristle brush name of at most 31 characters, as the Brushes page states for the Bristle Brush Options. The Name field stops taking characters at 31, and `brush.new` and `brush.options` refuse a longer new name with an error that names the limit. The page does not say how the limit counts characters or what happens to longer names already saved; counting characters and the number added to a taken name, keeping longer saved names, and leaving `brush.duplicate` unlimited are VectorCraft's own rules. A bristle brush that a document or a saved file already holds under a longer name keeps it, and the other brush types take a name of any length. Test: `bristle_brush_names_have_at_most_31_characters` in `tests/brushsym.rs`. Public reference: [Brushes](https://web.archive.org/web/20241230205225/https://helpx.adobe.com/illustrator/using/brushes.html) (archived copy). In the Brushes panel, Shift-click selects a range of brushes and Ctrl/Cmd-click adds or removes one. Delete Brush and Duplicate Brush then act on all of them (`brush.delete {names}`, `brush.duplicate {names}`). - The Brushes panel's Delete Brush button and panel menu item ask "Delete the brush selection?" with Yes and No when none of the brushes is in use. Alt-click (Option-click on macOS) on the button deletes them without asking, as the [Default keyboard shortcuts](https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html) page lists ("Delete without confirmation (except for Layers panel)"). When a stroke uses one of the brushes, the button, Alt-click and the menu item all ask with Remove Strokes and Cancel; Remove Strokes deletes the brushes and the strokes that used them become plain strokes. Tests: `panels::brushes::tests`, `dialogs::brush_delete::tests`. + The Brushes panel's Delete Brush button and panel menu item ask "Delete the selected brushes?" with Yes and No when none of the brushes is in use. Alt-click (Option-click on macOS) on the button deletes them without asking, as the [Default keyboard shortcuts](https://web.archive.org/web/20260726060015/https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html) page (archived copy) lists ("Delete without confirmation (except for Layers panel)"). When a stroke uses one of the brushes, the button, Alt-click and the menu item all ask with Remove Strokes and Cancel; Remove Strokes deletes the brushes and the strokes that used them become plain strokes. Tests: `panels::brushes::tests`, `dialogs::brush_delete::tests`. Document Info has a Brushes category after Graphic Styles. It lists the Brushes panel's brushes, or with Selection Only it lists the brushes that the selected objects' strokes use. The Document Info report and Package's report list them too (`document.info {category: "brushes"}`, `brushNames`). Document Info has a Repeat Objects category after Embedded Images. It lists each radial, grid and mirror Repeat object by name with its kind and the number of instances it makes. For a grid it gives the rows and columns instead, followed by the number of instances it draws when that is fewer. With Selection Only it lists the Repeat objects in the selection. The Document Info report and Package's report list them too (`document.info {category: "repeats"}`, `repeatObjects`). The Brushes panel menu's Select All Unused selects the brushes that are not used in the document, as the [Brushes](https://web.archive.org/web/20241230205225/https://helpx.adobe.com/illustrator/using/brushes.html) page (archived copy) describes. A brush counts as used when a stroke paints with it in the art (opacity masks included), in symbols, graph designs, pattern tiles or graphic styles, or in the art of a used brush (`brush.unused`). From 3a6770e7842558d8599dc50027be163835e3ba3d Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 30 Oct 2026 22:25:32 -0700 Subject: [PATCH 6/9] Brushes: Yes in Delete Brush asks again when a stroke started using a brush meanwhile The question for unused brushes checks again when Yes is chosen. If a stroke uses one of the brushes by then, the dialog asks with Remove Strokes and Cancel instead of deleting. --- crates/ui-egui/src/dialogs/brush_delete.rs | 22 ++++++++++++++++++- .../ui-egui/src/dialogs/brush_delete/tests.rs | 19 ++++++++++++++++ crates/ui-egui/src/panels/brushes.rs | 4 +--- 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/dialogs/brush_delete.rs b/crates/ui-egui/src/dialogs/brush_delete.rs index ee4d6c964..84f2786d4 100644 --- a/crates/ui-egui/src/dialogs/brush_delete.rs +++ b/crates/ui-egui/src/dialogs/brush_delete.rs @@ -28,6 +28,21 @@ pub fn ask(app: &mut VectorcraftApp, params: Value, used: bool) { app.ui.dialog = Some(Dialog::new(KIND, json!({"params": params, "used": used, "message": message}))); } +/// Whether a stroke uses one of `names` (`brush.unused`), or `None` when the query fails. +pub fn used(app: &mut VectorcraftApp, names: &[String]) -> Option { + let unused = app.run("brush.unused", json!({})).ok()?; + let unused = unused.get("names").and_then(Value::as_array).cloned().unwrap_or_default(); + Some(names.iter().any(|name| !unused.iter().any(|n| n.as_str() == Some(name)))) +} + +/// The brush names in `brush.delete` params (`name` or `names`). +fn names(params: &Value) -> Vec { + match params.get("name").and_then(Value::as_str) { + Some(name) => vec![name.to_string()], + None => params.get("names").and_then(Value::as_array).into_iter().flatten().filter_map(Value::as_str).map(str::to_string).collect(), + } +} + fn body(_: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> DialogAction { let mut action = DialogAction::None; ui.horizontal(|ui| { @@ -50,9 +65,14 @@ fn body(_: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> DialogActi action } -/// Closes before running, so a dialog the command opens stays open. +/// Closes before running, so a dialog the command opens stays open. Yes on brushes that a stroke +/// has started to use since the question opened asks again with Remove Strokes and Cancel. fn confirm(app: &mut VectorcraftApp, d: &Dialog) -> Result { let params = d.fields.get("params").cloned().unwrap_or_else(|| json!({})); + if !d.bool("used") && used(app, &names(¶ms)) == Some(true) { + ask(app, params, true); + return Ok(json!({})); + } app.ui.dialog = None; app.run("brush.delete", params) } diff --git a/crates/ui-egui/src/dialogs/brush_delete/tests.rs b/crates/ui-egui/src/dialogs/brush_delete/tests.rs index 407351c79..6f753505c 100644 --- a/crates/ui-egui/src/dialogs/brush_delete/tests.rs +++ b/crates/ui-egui/src/dialogs/brush_delete/tests.rs @@ -50,6 +50,25 @@ fn visible_yes_and_no_buttons_control_unused_deletion() { assert_eq!(app.session.active().unwrap().history.undo.len(), before + 1); } +#[test] +fn yes_asks_again_when_a_stroke_started_using_the_brush() { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 200, "height": 100})).unwrap(); + let name = "10 pt. Oval"; + let ctx = context(); + ask(&mut app, json!({"names": [name]}), false); + let path = NodeId(app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 60, "height": 40})).unwrap()["id"].as_u64().unwrap()); + app.run("brush.apply", json!({"name": name})).unwrap(); + let before = app.session.active().unwrap().history.undo.len(); + press(&ctx, &mut app, "Yes", 0.0); + assert!(app.ui.dialog.as_ref().is_some_and(|d| d.kind == KIND && d.bool("used")), "asks again with Remove Strokes"); + assert_eq!(app.session.active().unwrap().history.undo.len(), before); + let stroke = app.session.active().unwrap().doc.node(path).and_then(|n| n.appearance.stroke()).unwrap(); + assert_eq!(stroke.brush.as_deref(), Some(name)); + press(&ctx, &mut app, "Remove Strokes", 1.0); + assert!(app.run("brush.get", json!({"name": name})).is_err()); +} + #[test] fn visible_remove_strokes_and_cancel_buttons_control_used_deletion() { for choice in ["Cancel", "Remove Strokes"] { diff --git a/crates/ui-egui/src/panels/brushes.rs b/crates/ui-egui/src/panels/brushes.rs index 279677527..6f99c8a36 100644 --- a/crates/ui-egui/src/panels/brushes.rs +++ b/crates/ui-egui/src/panels/brushes.rs @@ -207,11 +207,9 @@ fn run_on(app: &mut VectorcraftApp, id: &str, names: &[String]) { /// Delete `names` after asking: Yes or No when none of them is in use, else Remove Strokes or /// Cancel. With `now` (Alt-click on the bottom button), brushes that are not in use go at once. fn delete(app: &mut VectorcraftApp, names: &[String], now: bool) { - let Ok(unused) = app.run("brush.unused", json!({})) else { + let Some(used) = crate::dialogs::brush_delete::used(app, names) else { return; }; - let unused = unused.get("names").and_then(Value::as_array).cloned().unwrap_or_default(); - let used = names.iter().any(|name| !unused.iter().any(|n| n.as_str() == Some(name))); if now && !used { run_on(app, "brush.delete", names); return; From bb563452904aedbfdcf96b59297953db090fb137 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 30 Oct 2026 22:41:30 -0700 Subject: [PATCH 7/9] Brushes: the Delete Brush question deletes nothing once another document is active The question records the document it was opened for. If another document has become the active one by the time it is confirmed, it closes as Cancel does. --- crates/ui-egui/src/dialogs/brush_delete.rs | 17 +++++++++++++---- .../ui-egui/src/dialogs/brush_delete/tests.rs | 16 ++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/dialogs/brush_delete.rs b/crates/ui-egui/src/dialogs/brush_delete.rs index 84f2786d4..52a86dc16 100644 --- a/crates/ui-egui/src/dialogs/brush_delete.rs +++ b/crates/ui-egui/src/dialogs/brush_delete.rs @@ -2,8 +2,8 @@ //! use, else Remove Strokes or Cancel. Yes and Remove Strokes run `brush.delete`, which leaves the //! strokes that used the brushes as plain strokes. //! -//! Fields: `message` (the question, shown as the heading), `used` (whether a brush is in use) and -//! `params` (the `brush.delete` params). +//! Fields: `message` (the question, shown as the heading), `used` (whether a brush is in use), +//! `params` (the `brush.delete` params) and `__doc` (the uid of the document it asks about). use serde_json::{Value, json}; @@ -25,9 +25,13 @@ pub fn ask(app: &mut VectorcraftApp, params: Value, used: bool) { } else { tl!("Delete the selected brushes?") }; - app.ui.dialog = Some(Dialog::new(KIND, json!({"params": params, "used": used, "message": message}))); + let doc = app.session.active().map(|d| d.uid); + app.ui.dialog = Some(Dialog::new(KIND, json!({"params": params, "used": used, "message": message, DOC: doc}))); } +/// The field that holds the uid of the document the question is about. +const DOC: &str = "__doc"; + /// Whether a stroke uses one of `names` (`brush.unused`), or `None` when the query fails. pub fn used(app: &mut VectorcraftApp, names: &[String]) -> Option { let unused = app.run("brush.unused", json!({})).ok()?; @@ -66,9 +70,14 @@ fn body(_: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> DialogActi } /// Closes before running, so a dialog the command opens stays open. Yes on brushes that a stroke -/// has started to use since the question opened asks again with Remove Strokes and Cancel. +/// has started to use since the question opened asks again with Remove Strokes and Cancel. When +/// another document has become the active one, it closes as Cancel does and deletes nothing. fn confirm(app: &mut VectorcraftApp, d: &Dialog) -> Result { let params = d.fields.get("params").cloned().unwrap_or_else(|| json!({})); + if d.fields.get(DOC).and_then(Value::as_u64) != app.session.active().map(|doc| doc.uid) { + app.ui.dialog = None; + return Ok(json!({})); + } if !d.bool("used") && used(app, &names(¶ms)) == Some(true) { ask(app, params, true); return Ok(json!({})); diff --git a/crates/ui-egui/src/dialogs/brush_delete/tests.rs b/crates/ui-egui/src/dialogs/brush_delete/tests.rs index 6f753505c..4092d6338 100644 --- a/crates/ui-egui/src/dialogs/brush_delete/tests.rs +++ b/crates/ui-egui/src/dialogs/brush_delete/tests.rs @@ -69,6 +69,22 @@ fn yes_asks_again_when_a_stroke_started_using_the_brush() { assert!(app.run("brush.get", json!({"name": name})).is_err()); } +#[test] +fn yes_deletes_nothing_after_another_document_became_active() { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 200, "height": 100})).unwrap(); + let name = app.run("brush.list", json!({})).unwrap()["brushes"][0]["name"].as_str().unwrap().to_string(); + let ctx = context(); + ask(&mut app, json!({"name": name}), false); + app.run("file.new", json!({"width": 200, "height": 100})).unwrap(); + app.run("document.activate", json!({"index": 1})).unwrap(); + press(&ctx, &mut app, "Yes", 0.0); + assert!(app.ui.dialog.is_none()); + assert!(app.run("brush.get", json!({"name": name})).is_ok(), "the second document keeps the brush"); + app.run("document.activate", json!({"index": 0})).unwrap(); + assert!(app.run("brush.get", json!({"name": name})).is_ok(), "the first document keeps the brush"); +} + #[test] fn visible_remove_strokes_and_cancel_buttons_control_used_deletion() { for choice in ["Cancel", "Remove Strokes"] { From beac4504fcaa0021c8e74f6de5d823acda904e15 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 31 Oct 2026 01:29:21 -0700 Subject: [PATCH 8/9] Brushes: the French delete questions keep the no-break space before ? --- crates/ui-egui/src/i18n/fr.tsv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index f80a70246..b8bfd769a 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -6006,8 +6006,8 @@ breakText Glyphs Glyphes Gap 4 Écart 4 Dash 5 Tiret 5 Gap 5 Écart 5 - Delete the selected brushes? Supprimer les formes sélectionnées ? - Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Des contours utilisent une ou plusieurs de ces formes. Retirer les formes de ces contours et supprimer les formes ? + Delete the selected brushes? Supprimer les formes sélectionnées ? + Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Des contours utilisent une ou plusieurs de ces formes. Retirer les formes de ces contours et supprimer les formes ? Remove Strokes Supprimer les contours Yes Oui No Non From 34d58c1bfbd95bdccc280849f3af991f06a50bdc Mon Sep 17 00:00:00 2001 From: bflatastic Date: Sun, 1 Nov 2026 01:22:03 +0700 Subject: [PATCH 9/9] i18n: one row per catalog entry after #4829 --- crates/ui-egui/src/i18n/bg.tsv | 2 -- crates/ui-egui/src/i18n/bs.tsv | 2 -- crates/ui-egui/src/i18n/ca.tsv | 2 -- crates/ui-egui/src/i18n/cs.tsv | 2 -- crates/ui-egui/src/i18n/da.tsv | 2 -- crates/ui-egui/src/i18n/de.tsv | 2 -- crates/ui-egui/src/i18n/el.tsv | 2 -- crates/ui-egui/src/i18n/es.tsv | 2 -- crates/ui-egui/src/i18n/fi.tsv | 2 -- crates/ui-egui/src/i18n/fr.tsv | 2 -- crates/ui-egui/src/i18n/hu.tsv | 2 -- crates/ui-egui/src/i18n/id.tsv | 2 -- crates/ui-egui/src/i18n/it.tsv | 2 -- crates/ui-egui/src/i18n/ja.tsv | 2 -- crates/ui-egui/src/i18n/ka.tsv | 2 -- crates/ui-egui/src/i18n/ko.tsv | 2 -- crates/ui-egui/src/i18n/nl.tsv | 2 -- crates/ui-egui/src/i18n/pl.tsv | 2 -- crates/ui-egui/src/i18n/pt-br.tsv | 2 -- crates/ui-egui/src/i18n/ru.tsv | 2 -- crates/ui-egui/src/i18n/sv.tsv | 2 -- crates/ui-egui/src/i18n/tr.tsv | 2 -- crates/ui-egui/src/i18n/uk.tsv | 2 -- crates/ui-egui/src/i18n/vi.tsv | 2 -- crates/ui-egui/src/i18n/zh-hans.tsv | 2 -- crates/ui-egui/src/i18n/zh-hant.tsv | 2 -- 26 files changed, 52 deletions(-) diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index 43cef9353..0888ac645 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -5902,8 +5902,6 @@ breakText Glyphs Глифи Delete the selected brushes? Да се изтрият избраните четки? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Щрихи използват една или повече от тези четки. Да се премахнат ли четките от тези щрихи и да се изтрият четките? Remove Strokes Премахване на щрихи - Yes Да - No Не # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Инструменти за подреждане Arrange in Grid… Подреждане в мрежа… diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 0deb3e7c3..d89af156f 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -5934,8 +5934,6 @@ shape Open Otvoren Delete the selected brushes? Izbrisati odabrane četkice? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Potezi koriste jednu ili više ovih četkica. Ukloniti četkice s tih poteza i izbrisati četkice? Remove Strokes Ukloni poteze - Yes Da - No Ne # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Alati za raspoređivanje Arrange in Grid… Rasporedi u mrežu… diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index a83e611a3..15bd85222 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -6002,8 +6002,6 @@ breakText Glyphs Glifs Delete the selected brushes? Voleu suprimir els pinzells seleccionats? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Hi ha traços que fan servir un o més d’aquests pinzells. Voleu treure els pinzells d’aquests traços i suprimir els pinzells? Remove Strokes Elimina els traços - Yes Sí - No No # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Eines d’organització Arrange in Grid… Organitza en quadrícula… diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 6fac8c558..fe80401bc 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -6011,8 +6011,6 @@ breakText Glyphs Glyfy Delete the selected brushes? Odstranit vybrané štětce? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Tahy používají jeden nebo více z těchto štětců. Odebrat štětce z těchto tahů a odstranit štětce? Remove Strokes Odebrat tahy - Yes Ano - No Ne # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Nástroje uspořádání Arrange in Grid… Uspořádat do mřížky… diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index ef3b48df5..74107e22c 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -5916,8 +5916,6 @@ breakText Glyphs Glyffer Delete the selected brushes? Slet de valgte pensler? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Streger bruger en eller flere af disse pensler. Fjern penslerne fra stregerne, og slet penslerne? Remove Strokes Fjern streger - Yes Ja - No Nej # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Arrangeringsværktøjer Arrange in Grid… Arrangér i gitter… diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 9028735e0..447c98350 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -5597,8 +5597,6 @@ breakText Glyphs Glyphen Delete the selected brushes? Ausgewählte Pinsel löschen? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Konturen verwenden einen oder mehrere dieser Pinsel. Pinsel von diesen Konturen entfernen und die Pinsel löschen? Remove Strokes Konturen entfernen - Yes Ja - No Nein # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Anordnungswerkzeuge Arrange in Grid… In Raster anordnen… diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index b8bd5f396..8dea59f7f 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -5964,8 +5964,6 @@ breakText Glyphs Γλύφοι Delete the selected brushes? Να διαγραφούν τα επιλεγμένα πινέλα; Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Περιγράμματα χρησιμοποιούν ένα ή περισσότερα από αυτά τα πινέλα. Να αφαιρεθούν τα πινέλα από αυτά τα περιγράμματα και να διαγραφούν τα πινέλα; Remove Strokes Αφαίρεση περιγραμμάτων - Yes Ναι - No Όχι # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Εργαλεία διάταξης Arrange in Grid… Διάταξη σε πλέγμα… diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index ac1e149df..e6c7dd769 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -5954,8 +5954,6 @@ breakText Glyphs Glifos Delete the selected brushes? ¿Eliminar los pinceles seleccionados? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Algunos trazos usan uno o más de estos pinceles. ¿Quitar los pinceles de esos trazos y eliminar los pinceles? Remove Strokes Quitar trazos - Yes Sí - No No # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Herramientas de organización Arrange in Grid… Organizar en cuadrícula… diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 13107e11e..08122ed02 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -6042,8 +6042,6 @@ breakText Glyphs Merkit Delete the selected brushes? Poistetaanko valitut siveltimet? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Viivat käyttävät yhtä tai useampaa näistä siveltimistä. Irrotetaanko siveltimet näistä viivoista ja poistetaanko siveltimet? Remove Strokes Poista viivat - Yes Kyllä - No Ei # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Järjestelytyökalut Arrange in Grid… Järjestä ruudukkoon… diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index b8bfd769a..b35297550 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -6009,8 +6009,6 @@ breakText Glyphs Glyphes Delete the selected brushes? Supprimer les formes sélectionnées ? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Des contours utilisent une ou plusieurs de ces formes. Retirer les formes de ces contours et supprimer les formes ? Remove Strokes Supprimer les contours - Yes Oui - No Non # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Outils de disposition Arrange in Grid… Disposer en grille… diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 3e72e0c39..cac7189ed 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -5998,8 +5998,6 @@ breakText Glyphs Glifák Delete the selected brushes? Törlöd a kijelölt ecseteket? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Körvonalak használnak egyet vagy többet ezek közül az ecsetek közül. Leveszed az ecseteket ezekről a körvonalakról, és törlöd az ecseteket? Remove Strokes Körvonalak eltávolítása - Yes Igen - No Nem # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Elrendezőeszközök Arrange in Grid… Elrendezés rácsba… diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 00bbfac31..29e87826a 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -5916,8 +5916,6 @@ breakText Glyphs Glif Delete the selected brushes? Hapus kuas yang dipilih? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Stroke menggunakan satu atau beberapa kuas ini. Lepaskan kuas dari stroke tersebut dan hapus kuasnya? Remove Strokes Hapus Stroke - Yes Ya - No Tidak # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Alat penyusunan Arrange in Grid… Susun dalam grid… diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 81b4ec79f..51870220a 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -5631,8 +5631,6 @@ breakText Glyphs Glifi Delete the selected brushes? Eliminare i pennelli selezionati? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Alcune tracce usano uno o più di questi pennelli. Rimuovere i pennelli da queste tracce ed eliminare i pennelli? Remove Strokes Rimuovi tracce - Yes Sì - No No # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Strumenti di disposizione Arrange in Grid… Disponi in griglia… diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 3064294fd..c6c4227b6 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -5697,8 +5697,6 @@ breakText Glyphs 字形 Delete the selected brushes? 選択したブラシを削除しますか? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? これらのブラシの 1 つ以上が線で使われています。それらの線からブラシを外して、ブラシを削除しますか? Remove Strokes 線を削除 - Yes はい - No いいえ # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools 配置ツール Arrange in Grid… グリッドに配置… diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 2d65308cb..c02d40eb1 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -6001,8 +6001,6 @@ breakText Glyphs გლიფები Delete the selected brushes? წაიშალოს არჩეული ფუნჯები? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? კონტურები იყენებს ამ ფუნჯებიდან ერთს ან მეტს. მოიხსნას ფუნჯები ამ კონტურებიდან და წაიშალოს ფუნჯები? Remove Strokes კონტურების მოხსნა - Yes დიახ - No არა # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools განლაგების ხელსაწყოები Arrange in Grid… ბადეში განლაგება… diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index e9fa809c2..5c24bd9ca 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -5594,8 +5594,6 @@ breakText Glyphs 글리프 Delete the selected brushes? 선택한 브러시를 삭제하시겠습니까? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? 선에서 이 브러시 중 하나 이상을 사용합니다. 해당 선에서 브러시를 제거하고 브러시를 삭제하시겠습니까? Remove Strokes 선 제거 - Yes 예 - No 아니요 # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools 배치 도구 Arrange in Grid… 격자로 배치… diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 2fdb5d58b..282b0a4aa 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -5960,8 +5960,6 @@ breakText Glyphs Glyphs Delete the selected brushes? Geselecteerde kwasten verwijderen? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Contouren gebruiken een of meer van deze kwasten. De kwasten van deze contouren halen en de kwasten verwijderen? Remove Strokes Contouren verwijderen - Yes Ja - No Nee # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Schikgereedschappen Arrange in Grid… In raster schikken… diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 73117d2fc..399971447 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -5867,8 +5867,6 @@ breakText Glyphs Glify Delete the selected brushes? Usunąć zaznaczone pędzle? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Obrysy używają co najmniej jednego z tych pędzli. Zdjąć pędzle z tych obrysów i usunąć pędzle? Remove Strokes Usuń obrysy - Yes Tak - No Nie # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Narzędzia układania Arrange in Grid… Ułóż w siatce… diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index b2282cb81..4f75dd659 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -5931,8 +5931,6 @@ breakText Glyphs Glifos Delete the selected brushes? Excluir os pincéis selecionados? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Traçados usam um ou mais destes pincéis. Remover os pincéis desses traçados e excluir os pincéis? Remove Strokes Remover Traçados - Yes Sim - No Não # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Ferramentas de Organização Arrange in Grid… Organizar em Grade… diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index a25e32e22..d412fa13b 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -5989,8 +5989,6 @@ breakText Glyphs Глифы Delete the selected brushes? Удалить выбранные кисти? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Обводки используют одну или несколько из этих кистей. Убрать кисти с этих обводок и удалить кисти? Remove Strokes Убрать обводки - Yes Да - No Нет # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Инструменты размещения Arrange in Grid… Разместить по сетке… diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 7075d1cd0..2a1ba3745 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -6064,8 +6064,6 @@ breakText Glyphs Glyfer Delete the selected brushes? Radera de valda penslarna? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Konturer använder en eller flera av de här penslarna. Ta bort penslarna från konturerna och radera penslarna? Remove Strokes Ta bort konturer - Yes Ja - No Nej # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Ordningsverktyg Arrange in Grid… Ordna i rutnät… diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 65679691a..215b7f8e6 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -5969,8 +5969,6 @@ breakText Glyphs Glifler Delete the selected brushes? Seçili fırçalar silinsin mi? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Konturlar bu fırçalardan birini veya daha fazlasını kullanıyor. Fırçalar bu konturlardan kaldırılsın ve fırçalar silinsin mi? Remove Strokes Konturları Kaldır - Yes Evet - No Hayır # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Düzenleme Araçları Arrange in Grid… Izgarada Düzenle… diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 7229a24af..13fab3c51 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -5611,8 +5611,6 @@ breakText Glyphs Гліфи Delete the selected brushes? Видалити вибрані пензлі? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Обведення використовують один або кілька з цих пензлів. Забрати пензлі з цих обведень і видалити пензлі? Remove Strokes Забрати обведення - Yes Так - No Ні # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Інструменти розміщення Arrange in Grid… Розмістити сіткою… diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 7e5393289..f45d5d04a 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -5613,8 +5613,6 @@ breakText Glyphs Glyph Delete the selected brushes? Xóa các cọ đã chọn? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? Có nét đang dùng một hoặc nhiều cọ này. Gỡ cọ khỏi các nét đó và xóa cọ? Remove Strokes Gỡ nét - Yes Có - No Không # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools Công cụ sắp xếp Arrange in Grid… Sắp xếp theo lưới… diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 5f0b5adce..4e105573f 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -5853,8 +5853,6 @@ breakText Glyphs 字形 Delete the selected brushes? 删除选中的画笔吗? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? 有描边使用了其中一个或多个画笔。要从这些描边移除画笔并删除画笔吗? Remove Strokes 移除描边 - Yes 是 - No 否 # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools 排列工具 Arrange in Grid… 按网格排列… diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 65e66a36e..acb829199 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -5650,8 +5650,6 @@ breakText Glyphs 字符 Delete the selected brushes? 要刪除選取的筆刷嗎? Strokes use one or more of these brushes. Take the brushes off those strokes and delete the brushes? 有筆畫使用了其中一個或多個筆刷。要從這些筆畫移除筆刷並刪除筆刷嗎? Remove Strokes 移除筆畫 - Yes 是 - No 否 # Arrange Tools add-on (Object › Plug-ins › Arrange Tools). Arrange Tools 排列工具 Arrange in Grid… 依格狀排列…