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.
This commit is contained in:
Adrian
2026-10-21 16:11:11 -04:00
parent eaed3409f8
commit ad28a5073a
+2 -3
View File
@@ -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| {