Skip to content

VectorCraft: An open-source, vector art tool written by scratch in pure Rust

Artboards: canvas menu to lock and unlock artboards (#2531)

vangel76b54a5e676589
diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv
index 38e44a75b..68a1bc3c9 100644
--- a/crates/ui-egui/src/i18n/bg.tsv
+++ b/crates/ui-egui/src/i18n/bg.tsv
@@ -5402,6 +5402,12 @@ theme Appearance Външен вид
Shift: Изместване:
Fresco… Фреска…
Fresco Фреска
+ Lock Artboards Заключване на работни области
+ Unlock Artboards Отключване на работни области
+ Lock Selected Заключване на избраните
+ Lock All Except Selected Заключване на всички без избраните
+ Lock All Заключване на всички
+ Unlock Selected Отключване на избраните
Effect Gallery… Галерия с ефекти…
Effect Gallery Dialog Диалог „Галерия с ефекти“
Arc Segment Tool Options Опции на инструмента „Дъгов сегмент“
diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv
index 19b5fe18e..ca98a6243 100644
--- a/crates/ui-egui/src/i18n/cs.tsv
+++ b/crates/ui-egui/src/i18n/cs.tsv
@@ -5459,6 +5459,12 @@ mark-style Japanese Japonské
Shift: Posun:
Fresco… Freska…
Fresco Freska
+ Lock Artboards Zamknout pracovní plochy
+ Unlock Artboards Odemknout pracovní plochy
+ Lock Selected Zamknout vybrané
+ Lock All Except Selected Zamknout vše kromě vybraných
+ Lock All Zamknout vše
+ Unlock Selected Odemknout vybrané
Effect Gallery… Galerie efektů…
Effect Gallery Dialog Dialog Galerie efektů
Arc Segment Tool Options Možnosti nástroje Obloukový segment
diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv
index ee9b566af..4102c5085 100644
--- a/crates/ui-egui/src/i18n/da.tsv
+++ b/crates/ui-egui/src/i18n/da.tsv
@@ -5418,6 +5418,12 @@ swatch Bright Violet Kraftig violet
Shift: Forskydning:
Fresco… Fresko…
Fresco Fresko
+ Lock Artboards Lås tegneflader
+ Unlock Artboards Lås tegneflader op
+ Lock Selected Lås markerede
+ Lock All Except Selected Lås alle undtagen markerede
+ Lock All Lås alle
+ Unlock Selected Lås markerede op
Effect Gallery… Effektgalleri…
Effect Gallery Dialog Dialogboksen Effektgalleri
Arc Segment Tool Options Indstillinger for buesegmentværktøj
diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv
index e600c2487..ea3180ac2 100644
--- a/crates/ui-egui/src/i18n/de.tsv
+++ b/crates/ui-egui/src/i18n/de.tsv
@@ -5039,6 +5039,12 @@ effect Soft Weich
Shift: Verschiebung:
Fresco… Fresko…
Fresco Fresko
+ Lock Artboards Zeichenflächen sperren
+ Unlock Artboards Zeichenflächen entsperren
+ Lock Selected Auswahl sperren
+ Lock All Except Selected Alle außer Auswahl sperren
+ Lock All Alle sperren
+ Unlock Selected Auswahl entsperren
Effect Gallery… Effekt-Galerie…
Effect Gallery Dialog Dialogfeld „Effekt-Galerie“
Arc Segment Tool Options Optionen für das Bogensegment-Werkzeug
diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv
index 8555dc81b..f56d01c08 100644
--- a/crates/ui-egui/src/i18n/el.tsv
+++ b/crates/ui-egui/src/i18n/el.tsv
@@ -5411,6 +5411,12 @@ effect Points Σημεία
Shift: Μετατόπιση:
Fresco… Νωπογραφία…
Fresco Νωπογραφία
+ Lock Artboards Κλείδωμα πινάκων σχεδίασης
+ Unlock Artboards Ξεκλείδωμα πινάκων σχεδίασης
+ Lock Selected Κλείδωμα επιλεγμένων
+ Lock All Except Selected Κλείδωμα όλων εκτός από τα επιλεγμένα
+ Lock All Κλείδωμα όλων
+ Unlock Selected Ξεκλείδωμα επιλεγμένων
Effect Gallery… Συλλογή εφέ…
Effect Gallery Dialog Παράθυρο διαλόγου Συλλογή εφέ
Arc Segment Tool Options Επιλογές εργαλείου τμήματος τόξου
diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv
index 7aa2dd5bb..afeefeca6 100644
--- a/crates/ui-egui/src/i18n/es.tsv
+++ b/crates/ui-egui/src/i18n/es.tsv
@@ -5401,6 +5401,12 @@ mark-style Japanese Japonesas
Shift: Desplazamiento:
Fresco… Fresco…
Fresco Fresco
+ Lock Artboards Bloquear mesas de trabajo
+ Unlock Artboards Desbloquear mesas de trabajo
+ Lock Selected Bloquear selección
+ Lock All Except Selected Bloquear todo excepto la selección
+ Lock All Bloquear todo
+ Unlock Selected Desbloquear selección
Effect Gallery… Galería de efectos…
Effect Gallery Dialog Cuadro de diálogo Galería de efectos
Arc Segment Tool Options Opciones de la herramienta Segmento de arco
diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv
index 52ab6f4e2..37712878e 100644
--- a/crates/ui-egui/src/i18n/fi.tsv
+++ b/crates/ui-egui/src/i18n/fi.tsv
@@ -5490,6 +5490,12 @@ swatch Bright Violet Kirkas violetti
Shift: Siirtymä:
Fresco… Fresko…
Fresco Fresko
+ Lock Artboards Lukitse piirtoalustat
+ Unlock Artboards Avaa piirtoalustojen lukitus
+ Lock Selected Lukitse valitut
+ Lock All Except Selected Lukitse kaikki paitsi valitut
+ Lock All Lukitse kaikki
+ Unlock Selected Avaa valittujen lukitus
Effect Gallery… Tehostegalleria…
Effect Gallery Dialog Tehostegalleria-valintaikkuna
Arc Segment Tool Options Kaarisegmenttityökalun asetukset
diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv
index 42ff46812..b7450e631 100644
--- a/crates/ui-egui/src/i18n/fr.tsv
+++ b/crates/ui-egui/src/i18n/fr.tsv
@@ -5458,6 +5458,12 @@ theme Appearance Apparence
Shift: Décalage :
Fresco… Fresque…
Fresco Fresque
+ Lock Artboards Verrouiller les plans de travail
+ Unlock Artboards Déverrouiller les plans de travail
+ Lock Selected Verrouiller la sélection
+ Lock All Except Selected Tout verrouiller sauf la sélection
+ Lock All Tout verrouiller
+ Unlock Selected Déverrouiller la sélection
Effect Gallery… Galerie d'effets…
Effect Gallery Dialog Boîte de dialogue Galerie d'effets
Arc Segment Tool Options Options de l’outil Segment d’arc
diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv
index 2a6456d9f..6b1820bbe 100644
--- a/crates/ui-egui/src/i18n/hu.tsv
+++ b/crates/ui-egui/src/i18n/hu.tsv
@@ -5445,6 +5445,12 @@ imageTrace Outline Körvonal
Shift: Eltolás:
Fresco… Freskó…
Fresco Freskó
+ Lock Artboards Rajztáblák zárolása
+ Unlock Artboards Rajztáblák zárolásának feloldása
+ Lock Selected Kijelöltek zárolása
+ Lock All Except Selected Összes zárolása a kijelölteken kívül
+ Lock All Összes zárolása
+ Unlock Selected Kijelöltek zárolásának feloldása
Effect Gallery… Effektusgaléria…
Effect Gallery Dialog Effektusgaléria párbeszédpanel
Arc Segment Tool Options Ívszakasz eszköz beállításai
diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv
index d268a8d6d..420a480c5 100644
--- a/crates/ui-egui/src/i18n/id.tsv
+++ b/crates/ui-egui/src/i18n/id.tsv
@@ -5418,6 +5418,12 @@ swatch Bright Violet Violet cerah
Shift: Pergeseran:
Fresco… Fresko…
Fresco Fresko
+ Lock Artboards Kunci artboard
+ Unlock Artboards Buka kunci artboard
+ Lock Selected Kunci yang dipilih
+ Lock All Except Selected Kunci semua kecuali yang dipilih
+ Lock All Kunci semua
+ Unlock Selected Buka kunci yang dipilih
Effect Gallery… Galeri Efek…
Effect Gallery Dialog Dialog Galeri Efek
Arc Segment Tool Options Opsi alat segmen busur
diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv
index bcd3656c2..4793d5ada 100644
--- a/crates/ui-egui/src/i18n/it.tsv
+++ b/crates/ui-egui/src/i18n/it.tsv
@@ -5073,6 +5073,12 @@ lighting Light Luce
Shift: Spostamento:
Fresco… Affresco…
Fresco Affresco
+ Lock Artboards Blocca tavole da disegno
+ Unlock Artboards Sblocca tavole da disegno
+ Lock Selected Blocca selezionate
+ Lock All Except Selected Blocca tutto tranne la selezione
+ Lock All Blocca tutto
+ Unlock Selected Sblocca selezionate
Effect Gallery… Galleria effetti…
Effect Gallery Dialog Finestra di dialogo Galleria effetti
Arc Segment Tool Options Opzioni strumento Segmento arco
diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv
index bf0852105..3e76db333 100644
--- a/crates/ui-egui/src/i18n/ja.tsv
+++ b/crates/ui-egui/src/i18n/ja.tsv
@@ -5120,6 +5120,12 @@ lighting Light ライト
Shift: シフト:
Fresco… フレスコ…
Fresco フレスコ
+ Lock Artboards アートボードをロック
+ Unlock Artboards アートボードのロックを解除
+ Lock Selected 選択をロック
+ Lock All Except Selected 選択以外をすべてロック
+ Lock All すべてをロック
+ Unlock Selected 選択のロックを解除
# Keyboard Shortcuts editor (File › Keyboard Shortcuts…) and the Print dialog's overprint note.
Keyboard Shortcuts キーボードショートカット
diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv
index 0355075d4..c6903ba13 100644
--- a/crates/ui-egui/src/i18n/ka.tsv
+++ b/crates/ui-egui/src/i18n/ka.tsv
@@ -5364,6 +5364,12 @@ imageTrace Outline კონტური
Shift: წანაცვლება:
Fresco… ფრესკა…
Fresco ფრესკა
+ Lock Artboards სამუშაო დაფების ჩაკეტვა
+ Unlock Artboards სამუშაო დაფების განბლოკვა
+ Lock Selected მონიშნულის ჩაკეტვა
+ Lock All Except Selected მონიშნულის გარდა ყველაფრის ჩაკეტვა
+ Lock All ყველაფრის ჩაკეტვა
+ Unlock Selected მონიშნულის განბლოკვა
Effect Gallery ეფექტების გალერეა
Add filters from the list above დაამატეთ ფილტრები ზემოთ მოცემული სიიდან
Add to Stack დასტაში დამატება
diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv
index ffbff3f16..99da0c022 100644
--- a/crates/ui-egui/src/i18n/ko.tsv
+++ b/crates/ui-egui/src/i18n/ko.tsv
@@ -5036,6 +5036,12 @@ lighting Light 광원
Shift: 이동:
Fresco… 프레스코…
Fresco 프레스코
+ Lock Artboards 아트보드 잠그기
+ Unlock Artboards 아트보드 잠금 해제
+ Lock Selected 선택 항목 잠그기
+ Lock All Except Selected 선택 항목 외 모두 잠그기
+ Lock All 모두 잠그기
+ Unlock Selected 선택 항목 잠금 해제
Effect Gallery… 효과 갤러리…
Effect Gallery Dialog 효과 갤러리 대화 상자
Arc Segment Tool Options 호 세그먼트 도구 옵션
diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv
index ab0495dbe..b7d4a8b13 100644
--- a/crates/ui-egui/src/i18n/nl.tsv
+++ b/crates/ui-egui/src/i18n/nl.tsv
@@ -5462,6 +5462,12 @@ swatch Bright Violet Felviolet
Shift: Verschuiving:
Fresco… Fresco…
Fresco Fresco
+ Lock Artboards Tekengebieden vergrendelen
+ Unlock Artboards Tekengebieden ontgrendelen
+ Lock Selected Selectie vergrendelen
+ Lock All Except Selected Alles behalve selectie vergrendelen
+ Lock All Alles vergrendelen
+ Unlock Selected Selectie ontgrendelen
Effect Gallery… Effectgalerij…
Effect Gallery Dialog Dialoogvenster Effectgalerij
Arc Segment Tool Options Opties boogsegmentgereedschap
diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv
index cb371fb37..b138cb5de 100644
--- a/crates/ui-egui/src/i18n/pl.tsv
+++ b/crates/ui-egui/src/i18n/pl.tsv
@@ -5311,6 +5311,12 @@ mark-style Japanese Japońskie
Shift: Przesunięcie:
Fresco… Fresk…
Fresco Fresk
+ Lock Artboards Zablokuj obszary kompozycji
+ Unlock Artboards Odblokuj obszary kompozycji
+ Lock Selected Zablokuj zaznaczone
+ Lock All Except Selected Zablokuj wszystkie oprócz zaznaczonych
+ Lock All Zablokuj wszystkie
+ Unlock Selected Odblokuj zaznaczone
Effect Gallery… Galeria efektów…
Effect Gallery Dialog Okno dialogowe Galeria efektów
Arc Segment Tool Options Opcje narzędzia Segment łuku
diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv
index 13d3ea4a3..7cfddfac8 100644
--- a/crates/ui-egui/src/i18n/pt-br.tsv
+++ b/crates/ui-egui/src/i18n/pt-br.tsv
@@ -5376,6 +5376,12 @@ mark-style Japanese Japonesas
Shift: Deslocamento:
Fresco… Afresco…
Fresco Afresco
+ Lock Artboards Bloquear Mesas de Trabalho
+ Unlock Artboards Desbloquear Mesas de Trabalho
+ Lock Selected Bloquear selecionadas
+ Lock All Except Selected Bloquear todas exceto as selecionadas
+ Lock All Bloquear tudo
+ Unlock Selected Desbloquear selecionadas
Effect Gallery… Galeria de Efeitos…
Effect Gallery Dialog Caixa de diálogo Galeria de Efeitos
Arc Segment Tool Options Opções da Ferramenta Segmento de Arco
diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv
index 5ff84988d..8c7badc51 100644
--- a/crates/ui-egui/src/i18n/ru.tsv
+++ b/crates/ui-egui/src/i18n/ru.tsv
@@ -5069,6 +5069,12 @@ lighting Light Свет
Shift: Сдвиг:
Fresco… Фреска…
Fresco Фреска
+ Lock Artboards Заблокировать монтажные области
+ Unlock Artboards Разблокировать монтажные области
+ Lock Selected Заблокировать выбранные
+ Lock All Except Selected Заблокировать все, кроме выбранных
+ Lock All Заблокировать все
+ Unlock Selected Разблокировать выбранные
Effect Gallery… Галерея эффектов…
Effect Gallery Dialog Диалог «Галерея эффектов»
Arc Segment Tool Options Параметры инструмента «Дуговой сегмент»
diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv
index 84924739c..bb7e61cfe 100644
--- a/crates/ui-egui/src/i18n/sv.tsv
+++ b/crates/ui-egui/src/i18n/sv.tsv
@@ -5483,6 +5483,12 @@ font-script Japanese Japanska
Shift: Förskjutning:
Fresco… Fresk…
Fresco Fresk
+ Lock Artboards Lås ritytor
+ Unlock Artboards Lås upp ritytor
+ Lock Selected Lås markerade
+ Lock All Except Selected Lås alla utom markerade
+ Lock All Lås alla
+ Unlock Selected Lås upp markerade
Effect Gallery… Effektgalleri…
Effect Gallery Dialog Dialogrutan Effektgalleri
Arc Segment Tool Options Alternativ för bågsegmentsverktyget
diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv
index e05fd2189..6de7a233f 100644
--- a/crates/ui-egui/src/i18n/uk.tsv
+++ b/crates/ui-egui/src/i18n/uk.tsv
@@ -5053,6 +5053,12 @@ lighting Light Світло
Shift: Зсув:
Fresco… Фреска…
Fresco Фреска
+ Lock Artboards Заблокувати монтажні області
+ Unlock Artboards Розблокувати монтажні області
+ Lock Selected Заблокувати вибрані
+ Lock All Except Selected Заблокувати всі, крім вибраних
+ Lock All Заблокувати всі
+ Unlock Selected Розблокувати вибрані
Effect Gallery… Галерея ефектів…
Effect Gallery Dialog Діалог «Галерея ефектів»
Arc Segment Tool Options Параметри інструменту «Дуговий сегмент»
diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv
index f0ff4a3db..f741c03cb 100644
--- a/crates/ui-egui/src/i18n/vi.tsv
+++ b/crates/ui-egui/src/i18n/vi.tsv
@@ -5053,6 +5053,12 @@ theme Appearance Giao diện
Shift: Dịch chuyển:
Fresco… Bích họa…
Fresco Bích họa
+ Lock Artboards Khóa các bảng vẽ
+ Unlock Artboards Mở khóa các bảng vẽ
+ Lock Selected Khóa mục đã chọn
+ Lock All Except Selected Khóa tất cả trừ mục đã chọn
+ Lock All Khóa tất cả
+ Unlock Selected Mở khóa mục đã chọn
Effect Gallery… Thư viện hiệu ứng…
Effect Gallery Dialog Hộp thoại Thư viện hiệu ứng
Arc Segment Tool Options Tùy chọn công cụ cung phân đoạn
diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv
index 1ddbf08fe..6d20becf8 100644
--- a/crates/ui-egui/src/i18n/zh-hans.tsv
+++ b/crates/ui-egui/src/i18n/zh-hans.tsv
@@ -5297,6 +5297,12 @@ lighting Light 光源
Shift: 偏移:
Fresco… 壁画…
Fresco 壁画
+ Lock Artboards 锁定画板
+ Unlock Artboards 解锁画板
+ Lock Selected 锁定所选
+ Lock All Except Selected 锁定除所选以外的全部
+ Lock All 全部锁定
+ Unlock Selected 解锁所选
Effect Gallery… 效果库…
Effect Gallery Dialog 效果库对话框
Arc Segment Tool Options 弧段工具选项
diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv
index 6b804a813..929516460 100644
--- a/crates/ui-egui/src/i18n/zh-hant.tsv
+++ b/crates/ui-egui/src/i18n/zh-hant.tsv
@@ -5092,6 +5092,12 @@ lighting Light 光源
Shift: 偏移:
Fresco… 壁畫…
Fresco 壁畫
+ Lock Artboards 鎖定工作區域
+ Unlock Artboards 解除鎖定工作區域
+ Lock Selected 鎖定所選
+ Lock All Except Selected 鎖定所選以外的全部
+ Lock All 全部鎖定
+ Unlock Selected 解除鎖定所選
Effect Gallery… 效果庫…
Effect Gallery Dialog 效果庫對話框
Arc Segment Tool Options 弧段工具選項
diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs
index 82ffc293f..621b845e8 100644
--- a/crates/ui-egui/src/menus.rs
+++ b/crates/ui-egui/src/menus.rs
@@ -3297,6 +3297,29 @@ pub fn context_items(app: &VectorcraftApp) -> Vec<Item> {
if st.isolation.is_some() {
v.extend([c("Exit Isolation Mode", "object.exitIsolation"), Sep]);
}
+ // Managing artboards from the canvas: with the Artboard tool, the menu locks and unlocks them
+ // (`artboard.setProps` with `locked` for each artboard named; an entry with none to change is left out).
+ if app.session.tool_id() == "artboard" {
+ let n = st.doc.artboards.len();
+ let sel = crate::panels::artboards::picked(app, n);
+ let others: Vec<usize> = (0..n).filter(|i| !sel.contains(i)).collect();
+ let entry = |label, idx: Vec<usize>, locked: bool| {
+ let list: Vec<Value> = idx.iter().map(|i| json!({ "index": i, "locked": locked })).collect();
+ (!list.is_empty()).then(|| cp(label, "artboard.setProps", json!({ "artboards": list })))
+ };
+ let lock: Vec<Item> =
+ [entry("Lock Selected", sel.clone(), true), entry("Lock All Except Selected", others, true), entry("Lock All", (0..n).collect(), true)]
+ .into_iter()
+ .flatten()
+ .collect();
+ let unlock: Vec<Item> = [entry("Unlock Selected", sel, false), entry("Unlock All", (0..n).collect(), false)].into_iter().flatten().collect();
+ for (label, items) in [("Lock Artboards", lock), ("Unlock Artboards", unlock)] {
+ if !items.is_empty() {
+ v.push(sub(label, items));
+ }
+ }
+ v.push(Sep);
+ }
// The locked objects under the pointer at the right-click, each unlocked as the Layers panel's
// lock column does. `unlock_item_label` shows each object's name.
let unlock: Vec<Item> = app
@@ -4184,6 +4207,12 @@ pub fn item_shortcut(id: &str, p: &Value) -> Option<&'static str> {
pub const CONTEXT_LABELS: &[&str] = &[
"Isolate Selected Group",
"Exit Isolation Mode",
+ "Lock Artboards",
+ "Lock Selected",
+ "Lock All Except Selected",
+ "Lock All",
+ "Unlock Artboards",
+ "Unlock Selected",
"Unlock",
"Make Clipping Mask",
"Release Clipping Mask",
diff --git a/crates/ui-egui/src/panels/artboards.rs b/crates/ui-egui/src/panels/artboards.rs
index 2acd0d16d..6cbe936a4 100644
--- a/crates/ui-egui/src/panels/artboards.rs
+++ b/crates/ui-egui/src/panels/artboards.rs
@@ -1745,4 +1745,31 @@ mod tests {
assert_eq!(names, ["Artboard 1", "Artboard 2"]);
assert_eq!((selected(&app, 2), app.session.tool_options()["active"].clone()), (1, json!(1)));
}
+ /// With the Artboard tool, the canvas context menu locks and unlocks artboards: Lock Selected
+ /// locks the selected one (the others stay free), Unlock All frees every artboard.
+ #[test]
+ fn the_artboard_tools_context_menu_locks_and_unlocks_artboards() {
+ use crate::menus::Item;
+ let mut app = VectorcraftApp::new(Session::new(), Default::default());
+ app.session.execute("file.new", &json!({"width": 100, "height": 100, "units": "Points", "artboards": 3})).unwrap();
+ let locked = |app: &VectorcraftApp| app.session.active().unwrap().doc.artboards.iter().map(|a| a.locked).collect::<Vec<_>>();
+ let run = |app: &mut VectorcraftApp, menu: &str, label: &str| {
+ let items = crate::menus::context_items(app);
+ let Some(Item::Sub(_, subs)) = items.iter().find(|i| matches!(i, Item::Sub(t, _) if *t == menu)) else { panic!("no {menu}") };
+ let Some(Item::Cmd(_, id, p)) = subs.iter().find(|i| matches!(i, Item::Cmd(l, ..) if *l == label)) else { panic!("no {label}") };
+ crate::menus::invoke(app, id, p.clone());
+ };
+ // Without the Artboard tool the menu has no such submenu.
+ assert!(!crate::menus::context_items(&app).iter().any(|i| matches!(i, Item::Sub(t, _) if *t == "Lock Artboards")));
+ app.select_tool("artboard");
+ select(&mut app, 1);
+ run(&mut app, "Lock Artboards", "Lock Selected");
+ assert_eq!(locked(&app), [false, true, false]);
+ run(&mut app, "Lock Artboards", "Lock All Except Selected");
+ assert_eq!(locked(&app), [true, true, true], "the others lock, the locked one stays");
+ run(&mut app, "Unlock Artboards", "Unlock Selected");
+ assert_eq!(locked(&app), [true, false, true]);
+ run(&mut app, "Unlock Artboards", "Unlock All");
+ assert_eq!(locked(&app), [false, false, false]);
+ }
}
diff --git a/crates/ui-egui/src/tests_contextmenu.rs b/crates/ui-egui/src/tests_contextmenu.rs
index dc1e898b0..1ee3ccdb0 100644
--- a/crates/ui-egui/src/tests_contextmenu.rs
+++ b/crates/ui-egui/src/tests_contextmenu.rs
@@ -283,6 +283,11 @@ fn every_context_label_is_a_menu_string() {
app.run("layer.setProps", json!({"ids": [a.0], "locked": true})).unwrap();
app.ui.context_locked = Some((app.session.active().unwrap().uid, vec![a]));
shown.extend(labels(&menus::context_items(&app)));
+ // The Lock Artboards and Unlock Artboards submenus of the Artboard tool.
+ app.run("artboard.new", json!({"x": 400, "y": 0, "width": 100, "height": 100})).unwrap();
+ app.run("artboard.setProps", json!({"index": 0, "locked": true})).unwrap();
+ app.select_tool("artboard");
+ shown.extend(labels(&menus::context_items(&app)));
let missing: Vec<_> = shown.iter().filter(|l| !strings.contains(**l)).collect();
assert!(missing.is_empty(), "context menu labels missing from menu_strings: {missing:?}");
for label in menus::CONTEXT_LABELS {
diff --git a/docs/gaps.md b/docs/gaps.md
index 8a2d21d2f..d044188c8 100644
--- a/docs/gaps.md
+++ b/docs/gaps.md
@@ -424,16 +424,10 @@ from G14 and the budget run of G15: **~170–270 h** one agent, ~50–80 h wall
segments for drawn lines. Controls are saved under Preferences › Smart Guides › Geometric Guides
and available from Control bar › Snapping; both default to on. Existing-line endpoint editing and
other tool cases remain unverified. [Public source](https://helpx.adobe.com/illustrator/desktop/measure-and-align/plot-and-measure/snap-to-perpendicular.html).
-- **Missing:** gradient perceptual blending and gradient presets (30.0); remaining tangent/perpendicular snapping cases and the consolidated snapping options (30.0); artboard locking, artboard colors in exports and print, and managing
-- **Missing:** gradient presets (30.0); tangent and perpendicular
-- **Missing:** gradient perceptual blending and gradient presets (30.0); tangent and perpendicular
-- **Partial (#2530):** tangent snapping to curves and perpendicular snapping to straight target
- segments for drawn lines. Controls are saved under Preferences › Smart Guides › Geometric Guides
- and available from Control bar › Snapping; both default to on. Existing-line endpoint editing and
- other tool cases remain unverified. [Public source](https://helpx.adobe.com/illustrator/desktop/measure-and-align/plot-and-measure/snap-to-perpendicular.html).
-- **Missing:** gradient perceptual blending and gradient presets (30.0); remaining tangent/perpendicular snapping cases and the consolidated snapping options (30.0); artboard locking, artboard colors in exports and print, and managing
- snapping and the consolidated snapping options (30.0); artboard locking, artboard colors in exports and print, and managing
- artboards from the canvas (30.0); the Blend panel with ease in/out and separate colour acceleration (30.7);
+- **Missing:** gradient presets (30.0); remaining tangent/perpendicular snapping cases and the consolidated
+ snapping options (30.0); artboard colors in exports and print, and managing artboards from the canvas other
+ than locking and unlocking them from the Artboard tool's right-click menu (30.0); the Blend panel with ease
+ in/out and separate colour acceleration (30.7);
the Dimension tool (28.x).
- **Evidence:** Adobe's 30.0 and 30.7 release announcements, see
[target-app-parity.md](target-app-parity.md#how-this-was-measured-2026-10-10).
diff --git a/docs/ui-parity.md b/docs/ui-parity.md
index b45c63120..5bdb9ab72 100644
--- a/docs/ui-parity.md
+++ b/docs/ui-parity.md
@@ -214,6 +214,7 @@ tools, never checked side by side) isn't captured row by row.
| Double-click a stroked segment to create a width point in Width Point Edit | done | Finite-arithmetic follow-up: engine regressions and full CI passed; [Validation evidence](target-app-parity.md#evidence-what-ships-today-by-area). Command and pointer regressions cover opening, sampled widths, adjoining adjustment on/off through checkbox/OK, compound paths, Cancel/Delete and Undo/Redo; dialog layout reviewed. [Validation evidence](target-app-parity.md#evidence-what-ships-today-by-area) |
| Shift-double-click a width point enables adjoining adjustment in Width Point Edit | done | Tool dispatch, plain double-click control, neighboring widths, Undo/Redo and Cancel in `dialogs/width_point.rs` |
| Alt-drag duplicates (objects, artboards with their art) | done | |
+| Artboard tool: the canvas right-click menu has Lock Artboards (Lock Selected, Lock All Except Selected, Lock All) and Unlock Artboards (Unlock Selected, Unlock All) | done | #2531; `artboard.setProps` with `locked` for each artboard named; the lock itself is #2592 |
| Document Setup → Edit Artboards applies valid settings, closes the dialog and activates the Artboard tool | done | Pointer-click tests cover successful handoff, invalid settings, OK, Cancel and Undo in `dialogs/document_setup.rs`. |
| Escape leaves Artboard editing for Selection; during a drag it first cancels the gesture | done | Headless egui key events cover idle Escape, active-drag cancellation and a subsequent Escape in `tests_distortkeys.rs`. |
| Escape while typing ends the edit, keeps the type selected and switches to the Selection tool | done | #1802 (#1686, #1656) |