Add A6 sheet preset to the welcome page

This commit is contained in:
moppeeer
2026-10-09 23:28:49 +02:00
parent 66c7ce7e96
commit 84be68d9c2
4 changed files with 6 additions and 1 deletions
+3
View File
@@ -21,3 +21,6 @@
real_name = "Brandon Thomas"
display_name = "Brandon Thomas"
sync_github_name = false
[people.moppeeer]
sync_github_name = true
+1
View File
@@ -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 },
+1 -1
View File
@@ -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 });
+1
View File
@@ -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),
];