From 9befcd2612f99fc4ee3a97344ebac195d4a1574a Mon Sep 17 00:00:00 2001 From: aiongg Date: Mon, 16 Nov 2026 03:18:57 +0000 Subject: [PATCH] merge-fwa: FW5: New Document Bitmap (1 bit, no Transparent), Pixel Aspect Ratio row, Web/Mobile cards turn Artboards on, Save Document Preset icon and pane --- .../src/patterns/form_dialogs/mod.rs | 3 +- .../src/patterns/form_dialogs/new_document.rs | 74 +++++++++-- .../form_dialogs/new_document/cards.rs | 9 +- .../form_dialogs/new_document/details.rs | 106 ++++++++++++---- .../form_dialogs/new_document/presets.rs | 94 ++++++++++++-- .../tests/it/form_dialogs/new_document.rs | 116 ++++++++++++++++-- 6 files changed, 345 insertions(+), 57 deletions(-) diff --git a/crates/ui-patterns/src/patterns/form_dialogs/mod.rs b/crates/ui-patterns/src/patterns/form_dialogs/mod.rs index 6ac988146..c732d1d32 100644 --- a/crates/ui-patterns/src/patterns/form_dialogs/mod.rs +++ b/crates/ui-patterns/src/patterns/form_dialogs/mod.rs @@ -54,7 +54,8 @@ mod new_document; pub use new_document::{ BACKGROUND_COLOR_KEY, BackgroundContents, BitDepth, ColorMode, ColorProfiles, DocumentOptions, DocumentPreset, HostedNewDocument, - NewDocumentDialog, NewDocumentOutput, NewDocumentPresetWords, NewDocumentResult, NewDocumentWords, Orientation, PresetCategory, + NewDocumentDialog, NewDocumentOutput, NewDocumentPresetWords, NewDocumentResult, NewDocumentWords, Orientation, PIXEL_ASPECTS, PresetCategory, + SQUARE_PIXELS, }; mod about; diff --git a/crates/ui-patterns/src/patterns/form_dialogs/new_document.rs b/crates/ui-patterns/src/patterns/form_dialogs/new_document.rs index 5aebc7bd4..95b449b17 100644 --- a/crates/ui-patterns/src/patterns/form_dialogs/new_document.rs +++ b/crates/ui-patterns/src/patterns/form_dialogs/new_document.rs @@ -32,7 +32,8 @@ use details::Right; pub(crate) use presets::push_recent; pub use presets::{ - BackgroundContents, BitDepth, ColorMode, ColorProfiles, DocumentOptions, DocumentPreset, NewDocumentPresetWords, Orientation, PresetCategory, + BackgroundContents, BitDepth, ColorMode, ColorProfiles, DocumentOptions, DocumentPreset, NewDocumentPresetWords, Orientation, PIXEL_ASPECTS, + PresetCategory, SQUARE_PIXELS, }; /// The key of the colour request Custom makes. @@ -84,19 +85,34 @@ craft_ui::words! { transparent: "newDocument.transparent" = "Transparent"; custom_color: "newDocument.customColor" = "Custom…"; custom_swatch: "newDocument.customSwatch" = "Custom background color"; - save_preset: "newDocument.savePreset" = "Save Preset…"; + /// The icon right of Name that opens the naming pane, and the pane's header. + save_preset_title: "newDocument.savePresetTitle" = "Save Document Preset"; + /// The naming pane's button that saves the preset. + save_preset: "newDocument.savePreset" = "Save Preset"; preset_name: "newDocument.presetName" = "Preset Name"; - save: "newDocument.save" = "Save"; + /// The name the naming pane proposes: `{n}` is the first number no saved preset has. + saved_name: template "newDocument.savedName" = "Saved {n}"; no_saved: "newDocument.noSaved" = "No saved presets yet."; too_many: "newDocument.tooMany" = "At most 256 document presets can be saved"; + bitmap: "newDocument.bitmap" = "Bitmap"; grayscale: "newDocument.grayscale" = "Grayscale"; rgb_color: "newDocument.rgbColor" = "RGB Color"; cmyk_color: "newDocument.cmykColor" = "CMYK Color"; lab_color: "newDocument.labColor" = "Lab Color"; + depth_1: "newDocument.depth1" = "1 bit"; depth_8: "newDocument.depth8" = "8 bit"; depth_16: "newDocument.depth16" = "16 bit"; depth_32: "newDocument.depth32" = "32 bit (float)"; orientation: "newDocument.orientation" = "Orientation"; + pixel_aspect: "newDocument.pixelAspect" = "Pixel Aspect Ratio"; + square_pixels: "newDocument.pixelAspectSquare" = "Square Pixels"; + d1_dv_ntsc: "newDocument.pixelAspectD1DvNtsc" = "D1/DV NTSC (0.91)"; + d1_dv_pal: "newDocument.pixelAspectD1DvPal" = "D1/DV PAL (1.09)"; + d1_dv_ntsc_widescreen: "newDocument.pixelAspectD1DvNtscWidescreen" = "D1/DV NTSC Widescreen (1.21)"; + hdv_1080: "newDocument.pixelAspectHdv1080" = "HDV 1080/DVCPRO HD 720 (1.33)"; + d1_dv_pal_widescreen: "newDocument.pixelAspectD1DvPalWidescreen" = "D1/DV PAL Widescreen (1.46)"; + anamorphic_2_to_1: "newDocument.pixelAspectAnamorphic2To1" = "Anamorphic 2:1 (2)"; + dvcpro_hd_1080: "newDocument.pixelAspectDvcproHd1080" = "DVCPRO HD 1080 (1.5)"; /// `{n}` is how many cards the open tab lists. presets_heading: template "newDocument.presetsHeading" = "Blank Document Presets ({n})"; preset_details: "newDocument.presetDetails" = "Preset Details"; @@ -123,6 +139,7 @@ struct Setup { screen_ppi: f64, profiles: Vec, app_name: Option