From 23e7dac068c903ba7ed3cd366d66d5cd8d0e6223 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Mon, 23 Nov 2026 09:22:38 -0500 Subject: [PATCH] prod merge: opt into the post-merge framework items (AppShell title_follows_lights for the macOS RTL title bar, Rename's name row select_on_focus, Format text paragraph spacing presets 0/6/12/18/24 and the 0-72 pt range on the field, the print dialog's printer search) --- crates/ui-egui/src/chrome.rs | 3 +++ crates/ui-egui/src/dialogs/rename_ui.rs | 2 +- crates/ui-egui/src/panels/format_text_ui.rs | 7 ++++++- crates/ui-egui/src/workflows/print_ui/dialog.rs | 2 ++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/chrome.rs b/crates/ui-egui/src/chrome.rs index 0666e2a75c..babb1ef5d0 100644 --- a/crates/ui-egui/src/chrome.rs +++ b/crates/ui-egui/src/chrome.rs @@ -37,6 +37,9 @@ pub(crate) fn shell(app: &mut PdfCraftApp, ui: &mut egui::Ui) { .screen_mode(Bind::given(app.screen_mode)) // A presentation shows the page and nothing else, so no reveal brings the bars back. .allow_reveal(false) + // macOS with a right-to-left system language puts the traffic lights at the right: the title bar mirrors + // with them, Home beside the lights and the tabs reading from the right (production 4448ee940). + .title_follows_lights(true) .title_bar(|ui, _, app: &mut PdfCraftApp| title_bar(app, ui)) .top(Slot::new("modes").visible(modes_visible), |ui, _, app: &mut PdfCraftApp| mode_bar::show(app, ui)) .start( diff --git a/crates/ui-egui/src/dialogs/rename_ui.rs b/crates/ui-egui/src/dialogs/rename_ui.rs index 32ae8b3ee4..912506bd36 100644 --- a/crates/ui-egui/src/dialogs/rename_ui.rs +++ b/crates/ui-egui/src/dialogs/rename_ui.rs @@ -77,7 +77,7 @@ impl RenameFacts { let unsaved = self.unsaved; let title = crate::i18n::fmt(tl!("Rename “{name}”"), &[("name", &self.current)]); let ok = if unsaved { tl!("Save and Rename") } else { tl!("Rename") }; - let params = vec![Param::new("name", tl!("File name"), ParamKind::text("")).hint(tl!("File name")).full_width()]; + let params = vec![Param::new("name", tl!("File name"), ParamKind::text("")).hint(tl!("File name")).full_width().select_on_focus()]; let reason = line.clone().filter(|_| refused); let mut dialog = ParamDialog::new(KEY, title, params).values(Bind::bound(fields)).ok_label(ok.into()).ok_enabled(ready).below(move |ui, _| { diff --git a/crates/ui-egui/src/panels/format_text_ui.rs b/crates/ui-egui/src/panels/format_text_ui.rs index d282fdff61..e623c45d78 100644 --- a/crates/ui-egui/src/panels/format_text_ui.rs +++ b/crates/ui-egui/src/panels/format_text_ui.rs @@ -245,7 +245,9 @@ const CHAR_SPACINGS: [f64; 8] = [-1.0, -0.5, 0.0, 0.5, 1.0, 2.0, 3.0, 5.0]; /// What can be typed: horizontal scale in percent, character spacing in points. const SCALE_RANGE: std::ops::RangeInclusive = 10.0..=400.0; const CHAR_SPACING_RANGE: std::ops::RangeInclusive = -5.0..=50.0; -/// The space between paragraphs the engine takes, in points. +/// The paragraph spacings the field's menu offers, in points. +const PARAGRAPH_SPACINGS: [f64; 5] = [0.0, 6.0, 12.0, 18.0, 24.0]; +/// The space between paragraphs the engine takes, in points: the bound the field shows and `apply` enforces. const PARAGRAPH_SPACING_RANGE: std::ops::RangeInclusive = 0.0..=72.0; /// The sizes the engine takes, in points: the bound the size field shows and `apply` enforces. const SIZE_RANGE: RangeInclusive = 1.0..=500.0; @@ -462,6 +464,7 @@ fn show( let sizes: Vec = SIZES.iter().map(|v| *v as f32).collect(); let scales: Vec = SCALES.iter().map(|v| *v as f32).collect(); let char_spacings: Vec = CHAR_SPACINGS.iter().map(|v| *v as f32).collect(); + let paragraph_spacings: Vec = PARAGRAPH_SPACINGS.iter().map(|v| *v as f32).collect(); let mut line_presets = vec![LineSpacing::Auto]; line_presets.extend(LINE_SPACINGS.iter().map(|v| LineSpacing::Multiple(*v as f32))); let range = |r: &RangeInclusive| *r.start() as f32..=*r.end() as f32; @@ -473,6 +476,8 @@ fn show( .scale_range(range(&SCALE_RANGE)) .char_spacing_presets(&char_spacings) .char_spacing_range(range(&CHAR_SPACING_RANGE)) + .paragraph_spacing_presets(¶graph_spacings) + .paragraph_spacing_range(range(&PARAGRAPH_SPACING_RANGE)) .unsupported(&unsupported); // With nothing to set it on the row still reads Auto, as production's does, not Mixed. text = text.line_spacing(v.line_spacing.unwrap_or(LineSpacing::Auto)); diff --git a/crates/ui-egui/src/workflows/print_ui/dialog.rs b/crates/ui-egui/src/workflows/print_ui/dialog.rs index 470c3167ec..d06e5ab1e5 100644 --- a/crates/ui-egui/src/workflows/print_ui/dialog.rs +++ b/crates/ui-egui/src/workflows/print_ui/dialog.rs @@ -137,6 +137,8 @@ impl PdfCraftApp { let sections = body::build(&self.print_draft, &sizes, self.units, self.print_draft.area.is_some(), no_printers); let mut dialog = HostedPrint::new(state, fields, sections).layout(PrintLayout::Document).held_ok(); dialog.set_driver(DriverControls::Properties); + // A long fleet: the printer list searches, Save as PDF stays at its end (production 0c39992c9). + dialog.set_printer_search(true); // PLAN: assumed `dialogs::host::open(app: &mut PdfCraftApp, dialog: D)` (pdf-dialogs-w4). crate::dialogs::host::open(self, dialog); }