DesignCraft: An open-source page and layout design editor written by scratch in pure Rust
Add A6 sheet preset to the welcome page (#248)
moppeeer06b4e4e860b7
diff --git a/contributors/people.toml b/contributors/people.tomlindex c480bd68a..f074153b8 100644--- a/contributors/people.toml+++ b/contributors/people.toml@@ -22,5 +22,8 @@ real_name = "Brandon Thomas"display_name = "Brandon Thomas"sync_github_name = false+[people.moppeeer]+sync_github_name = true+[people.thaynej]real_name = "Jeffrey Thayne"diff --git a/crates/doc/src/build.rs b/crates/doc/src/build.rsindex 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.rsindex d27390bc9..84a3ccbfc 100644--- a/crates/ui-egui/src/chrome.rs+++ b/crates/ui-egui/src/chrome.rs@@ -678,7 +678,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.rsindex 90fbed0a8..68452d954 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),];