diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index bdb51f1dd6..ea8e46fc20 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -548,12 +548,14 @@ impl PdfCraftApp { // Every parameter dialog lays out as a document dialog: inline captions, shaded groups, buttons across the foot. root.values.set(craft::ui::patterns::form_dialogs::DialogLayout(craft::ui::patterns::form_dialogs::ParamLayout::Document)); // PdfCraft's looks, opt-in over the framework's defaults: the filled dropdown triangle, shrinking document - // tabs with the modified dot, quiet (ghost) Cancel and Don't Save, and the theme's page insets. + // tabs with the modified dot, quiet (ghost) Cancel and Don't Save, the theme's page insets and the note + // pop-up's flat Reply button. root.values .set(craft::ui::controls::disclosure::DropdownArrow::Triangle) .set(craft::ui::tabs::DocumentTabLook::Shrinking) .set(craft::ui::sections::DialogButtonLook::Quiet) - .set(craft::pages::ui::PageInsets::Theme); + .set(craft::pages::ui::PageInsets::Theme) + .set(craft::review::ui::thread::NoteReplyLook::Flat); root.motion = self.animation_effects; // Today is the session's day, the one its date formats and Fill & Sign's Date tool use: the calendars ring it // and pick it. diff --git a/crates/ui-egui/src/canvas/organize.rs b/crates/ui-egui/src/canvas/organize.rs index d87f8375bb..dc9b028a06 100644 --- a/crates/ui-egui/src/canvas/organize.rs +++ b/crates/ui-egui/src/canvas/organize.rs @@ -168,7 +168,7 @@ pub(super) fn organize_grid(view: &mut DocView, doc: &pdfcraft_engine::Document, // PLAN: assumed `Props::tooltip(impl Into)` and `TooltipSpec -> Tooltip`. let hint = craft::ui::contract::TooltipSpec::new(tl!("Save these pages as one PDF")).disabled_text(tl!("No changes to save")); save |= Button::new(tl!("Save pages")).variant(Variant::PRIMARY).enabled(dirty).tooltip(hint).show(ui).clicked(); - close |= Button::new(tl!("Close")).variant(Variant::GHOST).icon(IconId::new("x")).show(ui).clicked(); + close |= Button::new(tl!("Close")).variant(Variant::GHOST).icon(IconId::new("close")).show(ui).clicked(); }) .show(cx.ui, |ui, _| { Text::new(label.clone()).show(ui); diff --git a/crates/ui-egui/src/dialogs/marks_ui.rs b/crates/ui-egui/src/dialogs/marks_ui.rs index 8e2af52a51..766dd3d8c7 100644 --- a/crates/ui-egui/src/dialogs/marks_ui.rs +++ b/crates/ui-egui/src/dialogs/marks_ui.rs @@ -515,8 +515,9 @@ fn choice(options: impl IntoIterator, default: &str) -> ParamKind::choice(options.into_iter().map(|(id, label)| (id, label.into())).collect(), Some(default.to_string())) } +/// A percent row: production shows one decimal and the sign ("100.0%"). fn percent(key: &str, label: &'static str, default: f64) -> Param { - Param::new(key, label, ParamKind::range(0.0, 100.0, default, Default::default())) + Param::new(key, label, ParamKind::range(0.0, 100.0, default, Default::default())).decimals(1).unit(UnitKind::Percent) } /// The six text boxes of Header & Footer: the box with focus is kept under `hf.focused`, which @@ -623,8 +624,12 @@ fn rows(kind: MarkKind, g: &Geometry) -> Vec { } MarkKind::Background => { let source = [("colour".to_string(), tl!("From colour").to_string()), ("file".to_string(), tl!("File").to_string())]; - rows.push(Param::new("source", tl!("Source"), ParamKind::radio(source.map(|(i, l)| (i, l.into())).to_vec(), Some("colour".into())))); - rows.push(Param::new("marks.bg.colour", tl!("Colour"), ParamKind::color(None)).enabled_when("source", "colour")); + // Production's line: From colour with its well right after it, then File; no caption over the options. + rows.push( + Param::new("source", tl!("Source"), ParamKind::radio(source.map(|(i, l)| (i, l.into())).to_vec(), Some("colour".into()))) + .options_in_row(), + ); + rows.push(Param::new("marks.bg.colour", tl!("Colour"), ParamKind::color(None)).enabled_when("source", "colour").under_option("colour")); file_rows(&mut rows); rows.push(percent("bg.opacity", tl!("Opacity"), 100.0)); // Offered only once the backdrop check finds a white backdrop: its label names the pages, and the pass diff --git a/crates/ui-egui/src/dialogs/page_dialogs.rs b/crates/ui-egui/src/dialogs/page_dialogs.rs index d1975dcd4e..9ad354c599 100644 --- a/crates/ui-egui/src/dialogs/page_dialogs.rs +++ b/crates/ui-egui/src/dialogs/page_dialogs.rs @@ -97,9 +97,15 @@ impl SplitFacts { Some("pages".into()), ), ) - .disabled_options(unavailable), - Param::new("pages", tl!("Pages per file"), ParamKind::int(Some(1), Some(self.count.max(1) as i64), 1)).enabled_when("mode", "pages"), - Param::new("size", tl!("At most (MB)"), ParamKind::number(Some(0.05), Some(2000.0), 2.0, 0.1, 2)).enabled_when("mode", "size"), + .disabled_options(unavailable) + // Production stacks the ways with no caption, each one's setting under it. + .stacked_options(), + Param::new("pages", tl!("Pages per file"), ParamKind::int(Some(1), Some(self.count.max(1) as i64), 1)) + .enabled_when("mode", "pages") + .under_option("pages"), + Param::new("size", tl!("At most (MB)"), ParamKind::number(Some(0.05), Some(2000.0), 2.0, 0.1, 2)) + .enabled_when("mode", "size") + .under_option("size"), ]; ParamDialog::new(SPLIT, tl!("Split document"), params) .ok_label(tl!("Split").into()) diff --git a/crates/ui-egui/src/home.rs b/crates/ui-egui/src/home.rs index 8a942f5145..7a97abd0cf 100644 --- a/crates/ui-egui/src/home.rs +++ b/crates/ui-egui/src/home.rs @@ -94,7 +94,7 @@ impl ItemSource for Tools { fn tool_tile(g: &'static ToolGroup, unpinnable: bool) -> Tile<'static> { let hue = DataColor::new(egui::Color32::from_rgb(g.hue[0], g.hue[1], g.hue[2])); let tile = Tile::new(tl!(g.label).to_string()).icon(IconId::new(g.icon)).hue(hue); - if unpinnable { tile.action(IconId::new("x"), CommandRef::new("home.unpin_tool")) } else { tile } + if unpinnable { tile.action(IconId::new("close"), CommandRef::new("home.unpin_tool")) } else { tile } } /// A grid of the tools `groups`; a click selects a tool and, with `unpinnable`, the hover action unpins it. @@ -167,7 +167,7 @@ pub fn show(app: &mut PdfCraftApp, ui: &mut egui::Ui) { Row::new().show(ui, |ui, _| { brand::mark(ui, PictureSize::Thumb(ThumbSize::Medium)); let _ = Text::new(tl!("Join the ArtCraft community").to_string()).role(TypeRole::Heading).show(ui); - if clicked(&IconButton::new(IconId::new("x")).id_salt("community-close").label(tl!("Close")).show(ui)) { + if clicked(&IconButton::new(IconId::new("close")).id_salt("community-close").label(tl!("Close")).show(ui)) { asked.borrow_mut().push(Asked::CloseCommunityCard); } }); diff --git a/crates/ui-egui/src/panels/side_panels.rs b/crates/ui-egui/src/panels/side_panels.rs index 28696f069f..2f3b0dd209 100644 --- a/crates/ui-egui/src/panels/side_panels.rs +++ b/crates/ui-egui/src/panels/side_panels.rs @@ -486,7 +486,7 @@ impl DockPanels for Panels<'_> { crate::calc_order_ui::header(ui); } else if crate::organize_panel::showing(self.app) { IconButton::command(IconSpec::svg(IconId::new("chevron-left")), CommandRef::new("tools.all")).show(ui); - IconButton::command(IconSpec::svg(IconId::new("x")), CommandRef::new("page.organize")).label(tl!("Close panel")).show(ui); + IconButton::command(IconSpec::svg(IconId::new("close")), CommandRef::new("page.organize")).label(tl!("Close panel")).show(ui); } else if self.app.left == LeftPanel::AllTools { IconButton::command(IconSpec::svg(IconId::new("maximize-2")), CommandRef::new("tools.expand")).show(ui); } diff --git a/crates/ui-egui/src/tools/content_ui.rs b/crates/ui-egui/src/tools/content_ui.rs index 4ef7295999..03baa95744 100644 --- a/crates/ui-egui/src/tools/content_ui.rs +++ b/crates/ui-egui/src/tools/content_ui.rs @@ -1050,12 +1050,12 @@ fn draft_session( // Hung below the box (above when there is no room), in place of production's bar beside it; the // warning for text the fonts can't draw is its first member. let corners = [paper.left_top(), paper.right_top(), paper.right_bottom(), paper.left_bottom()].map(|p| body.view.to_doc(p)); - let _ = TaskBar::fixed(tl!("Text box actions"), &corners).show(ui, body.rect, |ui, _| { + let _ = TaskBar::fixed(tl!("Text box actions"), &corners).compact(true).show(ui, body.rect, |ui, _| { if let Some(c) = blocked { let _ = Text::new(undrawable_message(c)).tone(Tone::Bad).show(ui); } done = IconButton::new(IconId::new("check")).label(tl!("Done adding text")).show(ui).clicks > 0; - discard = IconButton::new(IconId::new("x")).label(tl!("Discard this text (Esc)")).show(ui).clicks > 0; + discard = IconButton::new(IconId::new("close")).label(tl!("Discard this text (Esc)")).show(ui).clicks > 0; }); if discard || ended == Some(EditorEnd::Cancel) { cv.draft = None; diff --git a/crates/ui-egui/src/tools/fill_sign.rs b/crates/ui-egui/src/tools/fill_sign.rs index 8061119531..4808e29aa5 100644 --- a/crates/ui-egui/src/tools/fill_sign.rs +++ b/crates/ui-egui/src/tools/fill_sign.rs @@ -550,7 +550,7 @@ pub(crate) fn signature_entries(ui: &mut egui::Ui, app: &mut crate::PdfCraftApp) cx.with_draw(|draw| paint_signature(cx.painter.ctx(), draw, rect, saved, DataColor::new(cx.ink()))); }) .action_named(IconId::new("pencil"), CommandRef::new(slot.change_id), ctx_less_label("Change {what}", slot.what)) - .action_named(IconId::new("x"), CommandRef::new(slot.remove_id), ctx_less_label("Remove saved {what}", slot.what)) + .action_named(IconId::new("close"), CommandRef::new(slot.remove_id), ctx_less_label("Remove saved {what}", slot.what)) }); for event in out.response.events { command = match event { diff --git a/crates/ui-egui/src/workflows/scan_clean_ui.rs b/crates/ui-egui/src/workflows/scan_clean_ui.rs index df2550f794..f4d35d20be 100644 --- a/crates/ui-egui/src/workflows/scan_clean_ui.rs +++ b/crates/ui-egui/src/workflows/scan_clean_ui.rs @@ -55,7 +55,7 @@ fn build_dialog(fields: &mut DialogFields, base: ScanCleanSettings, count: usize ) .full_width(), Param::section(tl!("Pages")), - PageRangeOptions::param("pages", tl!("Pages"), count, current, PageRangeChoices::Current), + PageRangeOptions::param("pages", tl!("Pages"), count, current, PageRangeChoices::CurrentFromTo), Param::section(tl!("Filters")), Param::new("level", tl!("Background removal"), ParamKind::range(0.0, max, f64::from(base.level), SliderScale::Linear)) .decimals(0)