From 84be68d9c204b172ae1d434eeb2abe7ade150ec5 Mon Sep 17 00:00:00 2001 From: moppeeer <339764117+moppeeer@users.noreply.github.com> Date: Fri, 9 Oct 2026 23:28:49 +0200 Subject: [PATCH] Add A6 sheet preset to the welcome page --- contributors/people.toml | 3 +++ crates/doc/src/build.rs | 1 + crates/ui-egui/src/chrome.rs | 2 +- crates/ui-egui/src/panels/properties.rs | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/contributors/people.toml b/contributors/people.toml index 89c6db208..355c4ed98 100644 --- a/contributors/people.toml +++ b/contributors/people.toml @@ -21,3 +21,6 @@ real_name = "Brandon Thomas" display_name = "Brandon Thomas" sync_github_name = false + +[people.moppeeer] +sync_github_name = true diff --git a/crates/doc/src/build.rs b/crates/doc/src/build.rs index 4d6c3e0b0..c274f2130 100644 --- a/crates/doc/src/build.rs +++ b/crates/doc/src/build.rs @@ -34,6 +34,7 @@ pub const PRESETS: &[Preset] = &[ Preset { name: "A3", intent: Intent::Print, width: 297.0 * MM, height: 420.0 * MM, units: Unit::Millimeters }, Preset { name: "A4", intent: Intent::Print, width: 210.0 * MM, height: 297.0 * MM, units: Unit::Millimeters }, Preset { name: "A5", intent: Intent::Print, width: 148.0 * MM, height: 210.0 * MM, units: Unit::Millimeters }, + Preset { name: "A6", intent: Intent::Print, width: 105.0 * MM, height: 148.0 * MM, units: Unit::Millimeters }, Preset { name: "B5", intent: Intent::Print, width: 176.0 * MM, height: 250.0 * MM, units: Unit::Millimeters }, Preset { name: "Business Card", intent: Intent::Print, width: 252.0, height: 144.0, units: Unit::Picas }, Preset { name: "Postcard", intent: Intent::Print, width: 432.0, height: 288.0, units: Unit::Picas }, diff --git a/crates/ui-egui/src/chrome.rs b/crates/ui-egui/src/chrome.rs index dfb5e699b..ac85a5fab 100644 --- a/crates/ui-egui/src/chrome.rs +++ b/crates/ui-egui/src/chrome.rs @@ -648,7 +648,7 @@ pub fn start_screen(app: &mut DesignApp, ui: &mut egui::Ui) { )); ui.add_space(8.0); ui.horizontal_wrapped(|ui| { - for p in designcraft_doc::build::PRESETS.iter().take(10) { + for p in designcraft_doc::build::PRESETS.iter().filter(|p| p.intent == designcraft_doc::Intent::Print) { let (cr, resp) = ui.allocate_exact_size(vec2(120.0, 150.0), Sense::click()); let hov = resp.hovered(); ui.painter().rect_filled(cr, 6.0, if hov { t.hover } else { t.panel }); diff --git a/crates/ui-egui/src/panels/properties.rs b/crates/ui-egui/src/panels/properties.rs index 8644fe796..b413d4053 100644 --- a/crates/ui-egui/src/panels/properties.rs +++ b/crates/ui-egui/src/panels/properties.rs @@ -164,6 +164,7 @@ const PAGE_PRESETS: &[(&str, f64, f64)] = &[ ("A3", 841.89, 1190.55), ("A4", 595.276, 841.89), ("A5", 419.528, 595.276), + ("A6", 297.638, 419.528), ("B5", 498.898, 708.661), ];