[Fonts] Make the editor's fallback and Reset preview-independent

- Add ThemeManager::defaultAppFont(), which resolves an unset role against the
  startup font instead of currentFonts, and use it in FontGridWidget::loadFonts
  so the grid never shows the live preview as the theme's default.
- Reload the live theme in PaletteEditorDialog::onReset before re-reading the
  grid, so Reset restores the saved fonts before loadFonts resolves fallbacks.
This commit is contained in:
Lukas Brübach 2026-11-01 13:59:16 +01:00
parent b57cd77986
commit 77ed6550f9
4 changed files with 23 additions and 3 deletions

View file

@ -663,6 +663,14 @@ QFont ThemeManager::appFont(AppFont::Role role) const
return qApp->font();
}
QFont ThemeManager::defaultAppFont(AppFont::Role /*role*/) const
{
// No per-role scaling and no preview: an unset role resolves to the font
// captured at startup, which is what the theme falls back to once the
// editor closes.
return defaultFont;
}
void ThemeManager::themeChangedSlot()
{
QString themeName = SettingsCache::instance().getThemeName();