mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-07-23 02:24:27 -04:00
Improve font handling when resetting configurations and when restarting
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6649 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+4
-1
@@ -1141,12 +1141,12 @@ void Configuration::impl::read_settings ()
|
||||
&& next_font_ != font_)
|
||||
{
|
||||
font_ = next_font_;
|
||||
set_application_font (font_);
|
||||
}
|
||||
else
|
||||
{
|
||||
next_font_ = font_;
|
||||
}
|
||||
set_application_font (font_);
|
||||
|
||||
if (next_decoded_text_font_.fromString (settings_->value ("DecodedTextFont", "Courier, 10").toString ())
|
||||
&& next_decoded_text_font_ != decoded_text_font_)
|
||||
@@ -2511,6 +2511,9 @@ void Configuration::impl::update_audio_channels (QComboBox const * source_combo_
|
||||
|
||||
void Configuration::impl::set_application_font (QFont const& font)
|
||||
{
|
||||
qApp->setFont (font);
|
||||
// set font in the application style sheet as well in case it has
|
||||
// been modified in the style sheet which has priority
|
||||
qApp->setStyleSheet (qApp->styleSheet () + "* {" + font_as_stylesheet (font) + '}');
|
||||
for (auto& widget : qApp->topLevelWidgets ())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user