Skip to content

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

Integration: export artboard assets at the full board, no preference (#8254)

David Mann4e8015020035
diff --git a/crates/engine/src/prefs.rs b/crates/engine/src/prefs.rs
index 4843e1c9d..a34bda68e 100644
--- a/crates/engine/src/prefs.rs
+++ b/crates/engine/src/prefs.rs
@@ -519,9 +519,6 @@ pub struct Export {
pub webp_quality: u32,
pub metadata: ExportMetadata,
pub convert_to_srgb: bool,
- /// File › Generate › Image Assets exports an artboard named like an asset at the board's
- /// size, transparent edges included, instead of trimming it to its visible pixels.
- pub image_assets_full_artboards: bool,
}
impl Default for Export {
@@ -534,7 +531,6 @@ impl Default for Export {
webp_quality: 85,
metadata: ExportMetadata::Copyright,
convert_to_srgb: true,
- image_assets_full_artboards: false,
}
}
}
diff --git a/crates/engine/src/web_cmds.rs b/crates/engine/src/web_cmds.rs
index 7d97a270a..bba243c22 100644
--- a/crates/engine/src/web_cmds.rs
+++ b/crates/engine/src/web_cmds.rs
@@ -1037,7 +1037,6 @@ fn export_preferences(s: &mut Session, p: &Value) -> Result<Value> {
("webpQuality", "export.webpQuality"),
("metadata", "export.metadata"),
("convertToSrgb", "export.convertToSrgb"),
- ("imageAssetsFullArtboards", "export.imageAssetsFullArtboards"),
] {
if let Some(v) = p.get(k) {
values.insert(key.into(), v.clone());
@@ -1405,10 +1404,10 @@ fn asset_output_path(dir: &str, relative: &str) -> Result<(String, String)> {
/// Names are compared ignoring case, as `Logo.png` and `logo.png` are one file on Windows and
/// macOS.
///
-/// A layer is trimmed to its visible pixels. With `full_artboards` (Export Preferences › Image
-/// Assets: Keep Full Artboard Size) an artboard keeps its board, transparent edges included, as
-/// File › Export › Artboards to Files writes it.
-pub fn generate_assets(doc: &Document, dir: &str, full_artboards: bool) -> (Vec<String>, Vec<Value>) {
+/// A layer is trimmed to its visible pixels; an artboard keeps its whole board, transparent edges
+/// included, as File › Export › Artboards to Files writes it (Photoshop's Generator exports an
+/// artboard asset at the board's bounds).
+pub fn generate_assets(doc: &Document, dir: &str) -> (Vec<String>, Vec<Value>) {
let dpi = f64::from(doc.resolution_dpi.max(1.0));
let mut defaults: Option<Vec<AssetDefault>> = None;
let mut by_layer: Vec<Vec<(LayerId, AssetSpec)>> = Vec::new();
@@ -1440,8 +1439,7 @@ pub fn generate_assets(doc: &Document, dir: &str, full_artboards: bool) -> (Vec<
if written.contains(&key) {
return Err(other(format!("{rel}: another layer already writes this file; rename one of the layers")));
}
- let board = if full_artboards { crate::artboard_cmds::artboard_document(doc, *id)? } else { None };
- let mut one = match board {
+ let mut one = match crate::artboard_cmds::artboard_document(doc, *id)? {
Some(board) => board,
None => crate::layer_menu_cmds::layer_document(doc, *id)?,
};
@@ -1518,7 +1516,7 @@ fn image_assets(s: &mut Session, p: &Value) -> Result<Value> {
}
match dir {
Some(dir) if !cfg!(target_arch = "wasm32") => {
- let (files, errors) = generate_assets(&d.doc, &dir, s.prefs().export.image_assets_full_artboards);
+ let (files, errors) = generate_assets(&d.doc, &dir);
Ok(json!({"enabled": true, "dir": dir, "files": files, "errors": errors}))
}
_ => Ok(json!({"enabled": true, "dir": null, "files": [], "note": "assets are written when the document is saved"})),
@@ -1532,7 +1530,7 @@ pub fn on_saved(s: &Session, index: usize) -> Option<Value> {
return None;
}
let dir = assets_dir(d.path.as_deref()?);
- let (files, errors) = generate_assets(&d.doc, &dir, s.prefs().export.image_assets_full_artboards);
+ let (files, errors) = generate_assets(&d.doc, &dir);
Some(json!({"dir": dir, "files": files, "errors": errors}))
}
@@ -1560,7 +1558,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Export Preferences…",
&["File", "Export"],
None,
- r##"{"quickExportFormat":"png|jpg|gif|webp|exr"?,"quickExportLocation":"ask|sameFolder"?,"jpegQuality":1..100?,"webpLossless":bool?,"webpQuality":1..100?,"metadata":"none|copyright|all"?,"convertToSrgb":bool?,"imageAssetsFullArtboards":bool? (Image Assets export artboards at the board's size instead of trimming transparent edges)} → {values}"##,
+ r##"{"quickExportFormat":"png|jpg|gif|webp|exr"?,"quickExportLocation":"ask|sameFolder"?,"jpegQuality":1..100?,"webpLossless":bool?,"webpQuality":1..100?,"metadata":"none|copyright|all"?,"convertToSrgb":bool?} → {values}"##,
|_| Ok(()),
export_preferences
),
diff --git a/crates/engine/src/web_cmds/tests.rs b/crates/engine/src/web_cmds/tests.rs
index 1d893f2d5..4de2d43b9 100644
--- a/crates/engine/src/web_cmds/tests.rs
+++ b/crates/engine/src/web_cmds/tests.rs
@@ -639,17 +639,17 @@ fn image_assets_are_generated_now_and_on_save() {
d.layers.push(Layer::new("default 200% @2x", LayerContent::Group(photocraft_doc::Group { children: vec![], expanded: false, artboard: None })));
let lid = d.layers[1].id;
d.layer_mut(lid).unwrap().name = "icon.png".into();
- let (files, errors) = generate_assets(&d, &dir, false);
+ let (files, errors) = generate_assets(&d, &dir);
assert!(errors.is_empty(), "{errors:?}");
assert_eq!(files.iter().map(|p| std::path::PathBuf::from(p.as_str())).collect::<Vec<_>>(), vec![std::path::Path::new(&dir).join("[email protected]")]);
assert_eq!(decode(&files[0]).dimensions(), (128, 80));
}
-/// Export Preferences › Image Assets: Keep Full Artboard Size. A transparent artboard whose
-/// contents don't fill it is trimmed to its pixels by default; with the preference on it keeps
-/// the board's size, transparent edges included. Layers inside the board are still trimmed.
+/// Photoshop's Generator exports an artboard named like an asset at the board's size, transparent
+/// edges included (generator-assets renderer: the canvas bounds are the artboard's), with no
+/// preference. Layers inside the board are still trimmed to their pixels.
#[test]
-fn image_assets_keep_full_artboards_when_asked() {
+fn image_assets_keep_full_artboards() {
let dir = tmp("asset-artboards");
let mut s = Session::new();
s.execute("file.new", json!({"width": 64, "height": 48, "name": "boards.psd", "background": "transparent"})).unwrap();
@@ -664,19 +664,11 @@ fn image_assets_keep_full_artboards_when_asked() {
Ok(())
})
.unwrap();
- assert!(!s.prefs().export.image_assets_full_artboards, "trimming stays the default");
- let r = s.execute("file.generate.imageAssets", json!({"on": true, "dir": dir})).unwrap();
- assert!(r["errors"].as_array().unwrap().is_empty(), "{r}");
- assert_eq!(decode(&format!("{dir}/board.png")).dimensions(), (8, 6), "off: trimmed to the board's pixels");
- assert_eq!(decode(&format!("{dir}/logo.png")).dimensions(), (8, 6));
-
- let r = s.execute("file.export.exportPreferences", json!({"imageAssetsFullArtboards": true})).unwrap();
- assert_eq!(r["values"]["imageAssetsFullArtboards"], true);
let r = s.execute("file.generate.imageAssets", json!({"on": true, "dir": dir})).unwrap();
assert!(r["errors"].as_array().unwrap().is_empty(), "{r}");
let board = decode(&format!("{dir}/board.png"));
- assert_eq!(board.dimensions(), (40, 30), "on: the whole board");
+ assert_eq!(board.dimensions(), (40, 30), "the whole board, not its trimmed pixels");
let px = board.to_rgba8();
let at = |x: usize, y: usize| &px[(y * 40 + x) * 4..(y * 40 + x) * 4 + 4];
assert_eq!(at(0, 0)[3], 0, "the board's empty corner stays transparent");
@@ -685,12 +677,6 @@ fn image_assets_keep_full_artboards_when_asked() {
assert!(at(8, 4)[0] > 250 && at(8, 4)[3] == 255, "{:?}", at(8, 4));
assert_eq!(at(7, 4)[3], 0);
assert_eq!(decode(&format!("{dir}/logo.png")).dimensions(), (8, 6), "a layer on the board is still trimmed");
-
- // Preferences saved before this setting existed load with it off.
- let mut old = s.prefs().to_json();
- old["export"].as_object_mut().unwrap().remove("imageAssetsFullArtboards");
- let restored: crate::prefs::Preferences = serde_json::from_value(old).unwrap();
- assert!(!restored.export.image_assets_full_artboards);
}
/// #6614: two layers, or two default variants, naming one file never overwrite each other: the
@@ -714,7 +700,7 @@ fn image_assets_never_write_one_file_twice() {
let (top, logo) = (id(&d, "Top"), id(&d, "Logo"));
d.layer_mut(top).unwrap().name = "Logo.PNG".into();
d.layer_mut(logo).unwrap().name = "logo.png, logo.png".into();
- let (files, errors) = generate_assets(&d, &dir, false);
+ let (files, errors) = generate_assets(&d, &dir);
assert_eq!(files.iter().map(|p| std::path::PathBuf::from(p.as_str())).collect::<Vec<_>>(), vec![std::path::Path::new(&dir).join("Logo.png")]);
assert_eq!(decode(&files[0]).dimensions(), (4, 4), "the top layer keeps the file");
assert_eq!(errors.len(), 2, "{errors:?}");
@@ -727,7 +713,7 @@ fn image_assets_never_write_one_file_twice() {
d.layer_mut(logo).unwrap().name = "Logo".into();
d.layers
.push(Layer::new("default 50% + 200% + 200% @2x", LayerContent::Group(photocraft_doc::Group { children: vec![], expanded: false, artboard: None })));
- let (files, errors) = generate_assets(&d, &dir, false);
+ let (files, errors) = generate_assets(&d, &dir);
let names: Vec<_> = files.iter().map(|p| std::path::Path::new(p).file_name().unwrap().to_string_lossy().into_owned()).collect();
assert_eq!(names, ["icon.png", "[email protected]"]);
assert_eq!(decode(&files[0]).dimensions(), (2, 2), "the 50% variant keeps icon.png");
@@ -744,7 +730,7 @@ fn image_assets_reject_traversal_from_names_and_defaults() {
let id = d.layers[1].id;
d.layer_mut(id).unwrap().name =
format!("nested/ok.png, ../escaped.png, ..\\backslash.png, {outside}/absolute.png, C:\\drive\\escape.png, CON.png, aux/escape.png, foo./trailing.png");
- let (files, errors) = generate_assets(&d, &dir, false);
+ let (files, errors) = generate_assets(&d, &dir);
assert_eq!(files.iter().map(|p| std::path::PathBuf::from(p.as_str())).collect::<Vec<_>>(), vec![std::path::Path::new(&dir).join("nested").join("ok.png")]);
assert_eq!(errors.len(), 7, "{errors:?}");
assert!(errors.iter().all(|e| e["error"].as_str().unwrap().contains("unsafe component")), "{errors:?}");
@@ -756,7 +742,7 @@ fn image_assets_reject_traversal_from_names_and_defaults() {
"default ../ + /outside/ + ..\\bad/ + C:\\drive/ + 50% nested/",
LayerContent::Group(photocraft_doc::Group { children: vec![], expanded: false, artboard: None }),
));
- let (files, errors) = generate_assets(&d, &dir, false);
+ let (files, errors) = generate_assets(&d, &dir);
assert_eq!(
files.iter().map(|p| std::path::PathBuf::from(p.as_str())).collect::<Vec<_>>(),
vec![std::path::Path::new(&dir).join("nested").join("safe.png")]
@@ -780,7 +766,7 @@ fn image_assets_reject_existing_symlinks_in_folders_and_files() {
let mut d = (*session(8).active().unwrap().doc).clone();
let id = d.layers[1].id;
d.layer_mut(id).unwrap().name = "linked/new/sub.png, leaf.png, leaf.webp, good/safe.png".into();
- let (files, errors) = generate_assets(&d, &dir, false);
+ let (files, errors) = generate_assets(&d, &dir);
assert_eq!(files, vec![format!("{dir}/good/safe.png")]);
assert_eq!(errors.len(), 3, "{errors:?}");
assert!(errors.iter().all(|e| e["error"].as_str().unwrap().contains("symlink")), "{errors:?}");
@@ -791,7 +777,7 @@ fn image_assets_reject_existing_symlinks_in_folders_and_files() {
let linked_root = format!("{dir}/rootlink");
std::os::unix::fs::symlink(&outside, &linked_root).unwrap();
d.layer_mut(id).unwrap().name = "root.png".into();
- let (files, errors) = generate_assets(&d, &format!("{linked_root}/"), false);
+ let (files, errors) = generate_assets(&d, &format!("{linked_root}/"));
assert!(errors.is_empty(), "{errors:?}");
assert_eq!(files, vec![format!("{linked_root}/root.png")]);
assert!(std::path::Path::new(&format!("{outside}/root.png")).is_file());
diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv
index 6076fce1b..3cbbfe672 100644
--- a/crates/ui-egui/src/i18n/cs.tsv
+++ b/crates/ui-egui/src/i18n/cs.tsv
@@ -4107,9 +4107,6 @@ cameraRaw Dehaze Odstranění oparu
# Graphics Adapter preference (#1885)
GPU adapter Adaptér GPU
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Obrazové podklady: zachovat celou velikost kreslicí plochy
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Nejprve potvrďte nebo zrušte otevřený dialog kroku akce
Pro Medium Gray Pro (středně šedý)
diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv
index e419c29ac..cecf610a2 100644
--- a/crates/ui-egui/src/i18n/de.tsv
+++ b/crates/ui-egui/src/i18n/de.tsv
@@ -3373,9 +3373,6 @@ curves Smooth Glätten
# Graphics Adapter preference (#1885)
GPU adapter GPU-Adapter
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Bild-Assets: Volle Zeichenbereichsgröße beibehalten
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Bestätige oder brich zuerst den offenen Dialog des Aktionsschritts ab
Pro Medium Gray Pro (Mittelgrau)
diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv
index 72196e953..40069a334 100644
--- a/crates/ui-egui/src/i18n/el.tsv
+++ b/crates/ui-egui/src/i18n/el.tsv
@@ -4062,9 +4062,6 @@ curves Smooth Εξομάλυνση
# Graphics Adapter preference (#1885)
GPU adapter Προσαρμογέας GPU
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Πόροι εικόνας: διατήρηση πλήρους μεγέθους πίνακα σχεδίασης
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Επιβεβαιώστε ή ακυρώστε πρώτα το ανοιχτό παράθυρο βήματος της ενέργειας
Pro Medium Gray Pro μεσαίου γκρι
diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv
index ef4d78119..e0cf3a62e 100644
--- a/crates/ui-egui/src/i18n/es.tsv
+++ b/crates/ui-egui/src/i18n/es.tsv
@@ -4324,9 +4324,6 @@ navigator Zoom Zoom
# Graphics Adapter preference (#1885)
GPU adapter Adaptador de GPU
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Recursos de imagen: mantener el tamaño completo de la mesa de trabajo
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Confirme o cancele primero el cuadro de diálogo abierto del paso de la acción
Pro Medium Gray Pro (gris medio)
diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv
index 887bcb60c..b6df1c135 100644
--- a/crates/ui-egui/src/i18n/fr.tsv
+++ b/crates/ui-egui/src/i18n/fr.tsv
@@ -3373,9 +3373,6 @@ curves Smooth Lisser
# Graphics Adapter preference (#1885)
GPU adapter Adaptateur GPU
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Ressources d'image : conserver la taille complète du plan de travail
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Validez ou annulez d’abord la boîte de dialogue ouverte de l’étape de l’action
Pro Medium Gray Pro gris moyen
diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv
index 7ff02c866..cf66b3253 100644
--- a/crates/ui-egui/src/i18n/hu.tsv
+++ b/crates/ui-egui/src/i18n/hu.tsv
@@ -4278,9 +4278,6 @@ cameraRaw Yellow Sárga
# Graphics Adapter preference (#1885)
GPU adapter GPU-adapter
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Képelemek: a rajztábla teljes méretének megtartása
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Előbb hagyd jóvá vagy vond vissza a művelet lépésének nyitott párbeszédablakát
Pro Medium Gray Pro középszürke
diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv
index fe5f8d629..6198dd099 100644
--- a/crates/ui-egui/src/i18n/id.tsv
+++ b/crates/ui-egui/src/i18n/id.tsv
@@ -3376,9 +3376,6 @@ curves Smooth Haluskan
# Graphics Adapter preference (#1885)
GPU adapter Adaptor GPU
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Aset Gambar: Pertahankan Ukuran Penuh Artboard
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Konfirmasi atau batalkan dulu dialog langkah tindakan yang terbuka
Pro Medium Gray Pro Abu-abu Sedang
diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv
index 310f00251..a7b7c8538 100644
--- a/crates/ui-egui/src/i18n/it.tsv
+++ b/crates/ui-egui/src/i18n/it.tsv
@@ -4479,9 +4479,6 @@ shape Appearance Aspetto
# Graphics Adapter preference (#1885)
GPU adapter Adattatore GPU
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Risorse immagine: mantieni la dimensione intera della tavola da disegno
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Conferma o annulla prima la finestra di dialogo aperta del passo dell’azione
Pro Medium Gray Pro grigio medio
diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv
index 04b0cf659..214a56fd9 100644
--- a/crates/ui-egui/src/i18n/ja.tsv
+++ b/crates/ui-egui/src/i18n/ja.tsv
@@ -4040,9 +4040,6 @@ curves Smooth スムーズ
# Graphics Adapter preference (#1885)
GPU adapter GPU アダプター
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size 画像アセット: アートボード全体のサイズを保持
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first 先に開いているアクションのステップのダイアログを確定またはキャンセルしてください
Pro Medium Gray プロ(中間グレー)
diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv
index 534eed4d3..00bf8dff2 100644
--- a/crates/ui-egui/src/i18n/ko.tsv
+++ b/crates/ui-egui/src/i18n/ko.tsv
@@ -3571,9 +3571,6 @@ curves Smooth 매끄럽게
# Graphics Adapter preference (#1885)
GPU adapter GPU 어댑터
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size 이미지 에셋: 전체 아트보드 크기 유지
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first 먼저 열려 있는 액션 단계 대화 상자를 확인하거나 취소하세요
Pro Medium Gray 프로 중간 회색
diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv
index 71e5b5b28..472dab398 100644
--- a/crates/ui-egui/src/i18n/nl.tsv
+++ b/crates/ui-egui/src/i18n/nl.tsv
@@ -4122,9 +4122,6 @@ curves Smooth Vloeiend maken
# Graphics Adapter preference (#1885)
GPU adapter GPU-adapter
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Afbeeldingsmiddelen: volledige tekengebiedgrootte behouden
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Bevestig of annuleer eerst het geopende dialoogvenster van de handelingsstap
Pro Medium Gray Pro middelgrijs
diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv
index a30dfa6a3..5744be49d 100644
--- a/crates/ui-egui/src/i18n/pl.tsv
+++ b/crates/ui-egui/src/i18n/pl.tsv
@@ -3978,9 +3978,6 @@ curves Smooth Wygładź
# Graphics Adapter preference (#1885)
GPU adapter Karta GPU
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Zasoby obrazów: zachowaj pełny rozmiar obszaru roboczego
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Najpierw zatwierdź lub anuluj otwarte okno kroku operacji
Pro Medium Gray Pro (średni szary)
diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv
index f63f22ca7..67964ad89 100644
--- a/crates/ui-egui/src/i18n/pt-br.tsv
+++ b/crates/ui-egui/src/i18n/pt-br.tsv
@@ -4152,9 +4152,6 @@ layerLabel No Color Sem cor
# Graphics Adapter preference (#1885)
GPU adapter Adaptador de GPU
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Recursos de imagem: manter o tamanho completo da prancheta
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Confirme ou cancele primeiro a caixa de diálogo aberta da etapa da ação
diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv
index 3d81fa23b..791dcf8fb 100644
--- a/crates/ui-egui/src/i18n/ru.tsv
+++ b/crates/ui-egui/src/i18n/ru.tsv
@@ -3843,9 +3843,6 @@ curves Smooth Сгладить
# Graphics Adapter preference (#1885)
GPU adapter Адаптер GPU
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Ресурсы изображений: сохранять полный размер монтажной области
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Сначала подтвердите или отмените открытый диалог шага операции
Pro Medium Gray Средне-серая Pro
diff --git a/crates/ui-egui/src/i18n/sr.tsv b/crates/ui-egui/src/i18n/sr.tsv
index 656289647..9695ced46 100644
--- a/crates/ui-egui/src/i18n/sr.tsv
+++ b/crates/ui-egui/src/i18n/sr.tsv
@@ -4434,9 +4434,6 @@ shape Appearance Izgled
# Graphics Adapter preference (#1885)
GPU adapter GPU adapter
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Slikovni resursi: zadrži punu veličinu radne table
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Prvo potvrdite ili otkažite otvoreni dijalog koraka radnje
Pro Medium Gray Pro srednje siva
diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv
index efd25813c..342a0ebff 100644
--- a/crates/ui-egui/src/i18n/tr.tsv
+++ b/crates/ui-egui/src/i18n/tr.tsv
@@ -4092,9 +4092,6 @@ cameraData Lens Lens
# Graphics Adapter preference (#1885)
GPU adapter GPU bağdaştırıcısı
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Resim Varlıkları: Tam çalışma yüzeyi boyutunu koru
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Önce açık eylem adımı iletişim kutusunu onaylayın veya iptal edin
Pro Medium Gray Pro Orta Gri
diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv
index f82522a80..a96f02804 100644
--- a/crates/ui-egui/src/i18n/uk.tsv
+++ b/crates/ui-egui/src/i18n/uk.tsv
@@ -4071,9 +4071,6 @@ curves Smooth Згладити
# Graphics Adapter preference (#1885)
GPU adapter Адаптер GPU
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Ресурси зображення: зберігати повний розмір монтажної області
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Спочатку підтвердьте або скасуйте відкритий діалог кроку операції
Pro Medium Gray Середньосіра «Профі»
diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv
index 5bbb4391f..9c7155fe0 100644
--- a/crates/ui-egui/src/i18n/vi.tsv
+++ b/crates/ui-egui/src/i18n/vi.tsv
@@ -3854,9 +3854,6 @@ curves Smooth Làm mượt
# Graphics Adapter preference (#1885)
GPU adapter Bộ điều hợp GPU
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size Tài nguyên ảnh: Giữ nguyên kích thước bảng vẽ
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first Hãy xác nhận hoặc hủy hộp thoại bước hành động đang mở trước
Pro Medium Gray Pro xám vừa
diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv
index 791c4ccf9..c1630ad97 100644
--- a/crates/ui-egui/src/i18n/zh-hans.tsv
+++ b/crates/ui-egui/src/i18n/zh-hans.tsv
@@ -3021,9 +3021,6 @@ curves Smooth 平滑
# Graphics Adapter preference (#1885)
GPU adapter GPU 适配器
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size 图像资源:保留完整画板大小
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first 请先确认或取消打开的动作步骤对话框
Pro Medium Gray 专业中灰
diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv
index a1bf6696d..0771327a4 100644
--- a/crates/ui-egui/src/i18n/zh-hant.tsv
+++ b/crates/ui-egui/src/i18n/zh-hant.tsv
@@ -2985,9 +2985,6 @@ curves Smooth 平滑
# Graphics Adapter preference (#1885)
GPU adapter GPU 介面卡
-
-# Export Preferences › Image Assets: Keep Full Artboard Size
- Image Assets: Keep Full Artboard Size 影像資產:保留完整工作區域大小
# Actions: a step dialog holds a suspended recording (#7365)
Confirm or cancel the open action step dialog first 請先確認或取消開啟中的動作步驟對話框
Pro Medium Gray 專業中灰
diff --git a/crates/ui-egui/src/prefs_ui.rs b/crates/ui-egui/src/prefs_ui.rs
index ed0283347..5899fc51b 100644
--- a/crates/ui-egui/src/prefs_ui.rs
+++ b/crates/ui-egui/src/prefs_ui.rs
@@ -1214,10 +1214,6 @@ fn humanize(key: &str) -> String {
if key == "webpQuality" {
return "Quality".into();
}
- // File › Generate › Image Assets keeps a transparent artboard's full board instead of trimming it.
- if key == "imageAssetsFullArtboards" {
- return "Image Assets: Keep Full Artboard Size".into();
- }
// The auto-hide notice settings read best with their own labels (Interface › Notification, #2022).
if key == "notificationAutoHide" {
return "Auto Hide Notifications".into();
@@ -2736,7 +2732,6 @@ mod tests {
assert!(export_field_visible(&obj, "webpQuality"));
assert_eq!(humanize("webpLossless"), "Lossless");
assert_eq!(humanize("webpQuality"), "Quality");
- assert_eq!(humanize("imageAssetsFullArtboards"), "Image Assets: Keep Full Artboard Size");
obj.insert("quickExportFormat".into(), json!("exr"));
for key in ["jpegQuality", "webpLossless", "webpQuality", "convertToSrgb", "metadata"] {
assert!(!export_field_visible(&obj, key), "EXR must not offer ignored web settings: {key}");