diff options
| author | weinan li <[email protected]> | 2025-11-03 15:57:53 +0800 |
|---|---|---|
| committer | Akseli Lahtinen <[email protected]> | 2026-01-07 16:06:51 +0200 |
| commit | 3752ab41ba32ab4cc8afb7defb2014ab98178da2 (patch) | |
| tree | f6cc399b00cb56727436c5a1e51278cb9bc94a2f /src/settings/viewmodes | |
| parent | 8827cc92c53422f2c3cf292557c998c9c8e26b57 (diff) | |
viewmodes: ensure font dialog retains last custom selection
The font selection dialog for custom view fonts was always initialized with
the system default font instead of the previously selected custom font.
This occurred because QFontDialog::getFont() was not passed the current
custom font stored in DolphinFontRequester.
By initializing the dialog with currentFont() (which returns the stored
custom font when in Custom Font mode), users will now see their previous
font selection when reopening the dialog, enabling easier font finetuning.
BUG: 499786
Diffstat (limited to 'src/settings/viewmodes')
| -rw-r--r-- | src/settings/viewmodes/dolphinfontrequester.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/settings/viewmodes/dolphinfontrequester.cpp b/src/settings/viewmodes/dolphinfontrequester.cpp index 609c368c0..699df6f51 100644 --- a/src/settings/viewmodes/dolphinfontrequester.cpp +++ b/src/settings/viewmodes/dolphinfontrequester.cpp @@ -72,7 +72,8 @@ QFont DolphinFontRequester::customFont() const void DolphinFontRequester::openFontDialog() { bool ok = false; - const QFont font = QFontDialog::getFont(&ok, this); + const QFont initialFont = currentFont(); + const QFont font = QFontDialog::getFont(&ok, initialFont, this); if (ok) { m_customFont = font; m_modeCombo->setFont(m_customFont); |
