From 1700509ab2a35bd0f8110cf237dc5783a45b42b7 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Mon, 23 Nov 2026 06:13:48 -0500 Subject: [PATCH 1/5] prod merge: drop veils call show_with_files (the synced framework's name for the veil that hands over the held files) --- crates/ui-egui/src/chrome.rs | 2 +- crates/ui-egui/src/workflows/combine_ui/view.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/chrome.rs b/crates/ui-egui/src/chrome.rs index 741e5b207f..0666e2a75c 100644 --- a/crates/ui-egui/src/chrome.rs +++ b/crates/ui-egui/src/chrome.rs @@ -61,7 +61,7 @@ fn window_body(app: &mut PdfCraftApp, ui: &mut egui::Ui) { }); let veil = DropVeil::new(tl!("Drop to open the files")); let veil = if organize { veil.positional() } else { veil }; - let _ = veil.show(ui, |ui, files| { + let _ = veil.show_with_files(ui, |ui, files| { if let Some(files) = files { dropped = Some(files.files.clone()); } diff --git a/crates/ui-egui/src/workflows/combine_ui/view.rs b/crates/ui-egui/src/workflows/combine_ui/view.rs index 0622cca369..cee8262fbf 100644 --- a/crates/ui-egui/src/workflows/combine_ui/view.rs +++ b/crates/ui-egui/src/workflows/combine_ui/view.rs @@ -144,7 +144,7 @@ pub(crate) fn page(app: &mut PdfCraftApp, ui: &mut egui::Ui) { }); // The list; files dropped over the window join it. - DropVeil::new(tl!("Drop to add the files")).show(ui, |ui, files| { + DropVeil::new(tl!("Drop to add the files")).show_with_files(ui, |ui, files| { if let Some(files) = files { dropped = Some(files.files.clone()); } From 1a839bbbcb8d1c32665699f0b43d9293f9513c59 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Mon, 23 Nov 2026 06:13:48 -0500 Subject: [PATCH 2/5] prod merge: Edit rows count a text field only when one types (WindowHost::typing), as production's text_edit_focused egui's keyboard focus alone is also on an open menu's rows, which turned Edit > Copy on while preparing a form (comments::edit_copy_is_off_for_a_selected_comment_while_preparing_a_form). --- crates/ui-egui/src/menus.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index d734770ca2..673db11b69 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -271,9 +271,10 @@ pub(crate) fn gated(app: &PdfCraftApp) -> bool { } /// Whether a text field has the keyboard: the one signal behind the Edit rows' state and the native -/// menu's gate. +/// menu's gate. A text field only, as production's `text_edit_focused`: egui's keyboard focus alone is +/// also on an open menu's rows or a button, which would hand Edit ▸ Copy and Paste to them. pub(crate) fn text_editing(ctx: &egui::Context) -> bool { - ctx.egui_wants_keyboard_input() + craft::ui::runtime::windows::WindowHost::of(ctx).typing() } impl PdfCraftApp { From eaa3d02e572d22aec9bc1b13c8bf634d844d98cb Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Mon, 23 Nov 2026 06:13:48 -0500 Subject: [PATCH 3/5] prod merge: the tools drawer keeps grouped tools draggable (ToolbarDrawer::grouped_tools_drag, L-323 PdfCraft opt-in) --- crates/ui-egui/src/hotbar.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/hotbar.rs b/crates/ui-egui/src/hotbar.rs index dda30fbf54..ab9d489896 100644 --- a/crates/ui-egui/src/hotbar.rs +++ b/crates/ui-egui/src/hotbar.rs @@ -280,7 +280,12 @@ fn show_rail_over(app: &mut PdfCraftApp, ui: &mut egui::Ui, toolbar: &Tracked] = toolbar; - let drawer = ToolbarDrawer::new(output.response.rect, &groups, toolbar, output.dropped).kind(DrawerKind::Searchable).opened_by(opener).show(ui); + let drawer = ToolbarDrawer::new(output.response.rect, &groups, toolbar, output.dropped) + .kind(DrawerKind::Searchable) + // A tool held only inside a group stays draggable, so it can get a slot of its own (L-323). + .grouped_tools_drag() + .opened_by(opener) + .show(ui); let defaults = slots_with(app, &[]); let mut edited: Option>> = None; for edit in &drawer.edits { From 12e9e5161b492a9b2a2068506d95b5cda1f9dae0 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Mon, 23 Nov 2026 06:13:48 -0500 Subject: [PATCH 4/5] prod merge: Header & Footer boxes in two rows of three, as production lays them out (one row of six ran past the dialog's edge) --- crates/ui-egui/src/dialogs/marks_ui.rs | 47 ++++++++++++++++---------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/crates/ui-egui/src/dialogs/marks_ui.rs b/crates/ui-egui/src/dialogs/marks_ui.rs index a3987d6073..8e2af52a51 100644 --- a/crates/ui-egui/src/dialogs/marks_ui.rs +++ b/crates/ui-egui/src/dialogs/marks_ui.rs @@ -525,25 +525,36 @@ fn boxes_row() -> Param { let companions: Vec = (0..6).map(|k| format!("hf.text.{k}")).chain(["hf.focused".to_string()]).collect(); Param::custom("hf.boxes", tl!("Header and footer text"), |ui, fields, _cx| { let mut out: Option = None; - for (k, name) in BOX_NAMES.iter().enumerate() { - let key = format!("hf.text.{k}"); - let before = fields.text(&key).unwrap_or_default().to_owned(); - let mut text = before.clone(); - let r = ui - .push_id(("hf-box", k), |ui| TextField::new(tl!(name), craft::ui::contract::Bind::bound(&mut text)).lines(2).show(ui).response) - .inner; - // The field's focus stop is the component: egui's focus sits on its text part. - if craft::ui::runtime::focus::is_focused(ui.ctx(), r.id) { - fields.set("hf.focused", FieldValue::Int(k as i64)); + // Two rows of three, the header's boxes over the footer's, as production lays them out: one row of six runs + // past the dialog's edge. + ui.vertical(|ui| { + for (row, names) in BOX_NAMES.chunks(3).enumerate() { + ui.horizontal(|ui| { + for (col, name) in names.iter().enumerate() { + let k = row * 3 + col; + let key = format!("hf.text.{k}"); + let before = fields.text(&key).unwrap_or_default().to_owned(); + let mut text = before.clone(); + let r = ui + .push_id(("hf-box", k), |ui| { + TextField::new(tl!(name), craft::ui::contract::Bind::bound(&mut text)).lines(2).show(ui).response + }) + .inner; + // The field's focus stop is the component: egui's focus sits on its text part. + if craft::ui::runtime::focus::is_focused(ui.ctx(), r.id) { + fields.set("hf.focused", FieldValue::Int(k as i64)); + } + if text != before { + fields.set(key, FieldValue::Text(text)); + } + out = Some(match out.take() { + Some(o) => o.union(r), + None => r, + }); + } + }); } - if text != before { - fields.set(key, FieldValue::Text(text)); - } - out = Some(match out { - Some(o) => o.union(r), - None => r, - }); - } + }); out.unwrap_or_else(|| ui.response()) }) .companions(companions) From d5892bdf6acb682c997fa059fb33708a4e5c7234 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Mon, 23 Nov 2026 06:13:49 -0500 Subject: [PATCH 5/5] prod merge: format panel test takes the first Times match (the framework's row and its text both carry the name) --- crates/ui-egui/tests/it/editing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui-egui/tests/it/editing.rs b/crates/ui-egui/tests/it/editing.rs index e23265dff2..c04b85c546 100644 --- a/crates/ui-egui/tests/it/editing.rs +++ b/crates/ui-egui/tests/it/editing.rs @@ -10438,7 +10438,7 @@ fn format_panel_shows_selection_size_and_updates_after_font_applied() { // Apply Times to the whole block font_node.click(); h.run_steps(2); - h.get_by_label("Times").click(); + h.query_all_by_label("Times").next().expect("the Times row").click(); h.run_steps(4); // Now all text is Times, so font combo box updates to Times