Skip to content

LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust

LRC-PRINT-PAGE: the preview draws no Page Options for a package, as the print doesn't

Brandon Thomas1e4aa93d58ed
diff --git a/crates/ui-egui/src/print_view.rs b/crates/ui-egui/src/print_view.rs
index 6e35f5b10..0c3745270 100644
--- a/crates/ui-egui/src/print_view.rs
+++ b/crates/ui-egui/src/print_view.rs
@@ -876,7 +876,11 @@ fn paint_cell(
/// The Page Options as the print draws them ([`compose`]): crop marks at the corners of each
/// photo, the page number at the bottom right and the print settings at the bottom left.
+/// Packages draw none of them, as the print doesn't ([`compose::has_page_options`]).
fn page_options(painter: &egui::Painter, st: &PrintSettings, sheet: &Sheet, photos: &[Rect], number: usize) {
+ if !compose::has_page_options(st.layout.style) {
+ return;
+ }
let p = &st.page;
let ink = compose::mark_ink(p.background);
let ink = Color32::from_rgb(ink[0], ink[1], ink[2]);