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:
Bill Somerville
2016-04-26 20:06:36 +00:00
parent 4797cee661
commit d9e4d5f25f
2 changed files with 20 additions and 3 deletions
+4 -1
View File
@@ -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 ())
{