From a96e58b6bd0140a5e4f5ec95cb50bc8f940eff00 Mon Sep 17 00:00:00 2001 From: aiongg Date: Thu, 12 Nov 2026 06:57:16 +0000 Subject: [PATCH] MissingFontsDialog: the Replace With caption over the missing fonts The field group named its rows for AccessKit only. A fixed section in the caption strength shows the old grey caption over them, with no rule. --- crates/font-manager/src/missing.rs | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/crates/font-manager/src/missing.rs b/crates/font-manager/src/missing.rs index e95222a22..14c73dd05 100644 --- a/crates/font-manager/src/missing.rs +++ b/crates/font-manager/src/missing.rs @@ -17,7 +17,7 @@ use craft_ui::form::{Field, FieldGroup}; use craft_ui::layout_components::Stack; use craft_ui::list::{List, ListRow}; use craft_ui::runtime::env::{Env, Label}; -use craft_ui::sections::{DialogRole, FooterButton, Section}; +use craft_ui::sections::{DialogRole, FooterButton, HeaderStrength, Section}; use egui::Ui; use crate::picker::FontPicker; @@ -221,18 +221,20 @@ impl StackDialog for MissingFontsDialog { .show(ui, |ui, _| { Stack::new().show(ui, |ui, _| { Text::new(message.clone()).show(ui); - FieldGroup::new(words.replace_with.clone()).show(ui, |ui, _| { - for (i, row) in rows.iter().enumerate().filter(|(_, r)| r.status == FontStatus::Missing) { - let name = font_name(&row.font); - let label = Label::from(words.missing_font.fill(&[("font", &name), ("status", words.missing.as_str())])); - Field::new(label.clone()).show(ui, |ui, _| { - let mut current = replacements[i].clone().unwrap_or_else(|| default_family.clone()); - let out = FontPicker::new(label.clone(), Bind::bound(&mut current), catalog).show(ui); - if let Some(picked) = out.picked { - replacements[i] = Some(picked); - } - }); - } + Section::fixed(words.replace_with.clone()).strength(HeaderStrength::Caption).show(ui, |ui, _| { + FieldGroup::new(words.replace_with.clone()).show(ui, |ui, _| { + for (i, row) in rows.iter().enumerate().filter(|(_, r)| r.status == FontStatus::Missing) { + let name = font_name(&row.font); + let label = Label::from(words.missing_font.fill(&[("font", &name), ("status", words.missing.as_str())])); + Field::new(label.clone()).show(ui, |ui, _| { + let mut current = replacements[i].clone().unwrap_or_else(|| default_family.clone()); + let out = FontPicker::new(label.clone(), Bind::bound(&mut current), catalog).show(ui); + if let Some(picked) = out.picked { + replacements[i] = Some(picked); + } + }); + } + }); }); Section::new(words.used_fonts.clone()).initially_open(false).remember(DOCUMENT_FONTS_OPEN).show(ui, |ui, _| { List::::new(words.font.clone()).select(SelectMode::Single).sizing(Sizing::Content).max_rows(6).show_items(