From ad28a5073aa09c79879f9066ffd2653e198edae7 Mon Sep 17 00:00:00 2001 From: Adrian Date: Wed, 21 Oct 2026 16:11:11 -0400 Subject: [PATCH] js_ui: put the preferences_body doc comment back on preferences_body (#3557) The old doc comment was left above the constants added in this change, where it documents PREFERENCES_BUTTON_ROW wrongly, and its "Returns true to close" no longer holds for preferences_body, which returns (). Move its first sentence onto preferences_body, drop the "Returns" sentence, and leave each constant with only its own comment. --- crates/ui-egui/src/js_ui.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/js_ui.rs b/crates/ui-egui/src/js_ui.rs index 00b129b9bb..10e86a1dbf 100644 --- a/crates/ui-egui/src/js_ui.rs +++ b/crates/ui-egui/src/js_ui.rs @@ -260,7 +260,6 @@ fn reading_mode_label(mode: &str) -> &'static str { } } -/// Preferences: interface language and size, appearance, identity and JavaScript. Returns `true` to close. /// The height the Preferences dialog keeps below its scrolling settings for the OK row: the /// button, and the space above it. pub(crate) const PREFERENCES_BUTTON_ROW: f32 = 52.0; @@ -270,8 +269,8 @@ pub(crate) const PREFERENCES_BUTTON_ROW: f32 = 52.0; /// leaves 173 pt): a taller floor would push OK off the screen again. pub(crate) const PREFERENCES_MIN_SCROLL: f32 = 60.0; -/// The settings, to be drawn in a scroll area; [`preferences_buttons`] goes below it, outside the -/// scroll, so OK is always in reach. +/// Preferences: interface language and size, appearance, identity and JavaScript. Drawn in a scroll +/// area; [`preferences_buttons`] goes below it, outside the scroll, so OK is always in reach. pub(crate) fn preferences_body(ui: &mut egui::Ui, app: &mut PdfCraftApp, t: &Tokens) { ui.label(egui::RichText::new(tl!("Preferences")).font(theme::semibold(18.0))); ui.horizontal(|ui| {