From 3752ab41ba32ab4cc8afb7defb2014ab98178da2 Mon Sep 17 00:00:00 2001 From: weinan li Date: Mon, 3 Nov 2025 15:57:53 +0800 Subject: 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 --- src/settings/viewmodes/dolphinfontrequester.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/settings/viewmodes') 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); -- cgit v1.3