Follow KDE settings for menu and toolbar fonts

Makes pure Qt applications integrate better when those fonts don't
match the general fonts.

Change-Id: Ic06e8595efc44f0c6649cf364e751c4c714cda93
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
bb10
Allan Sandfeld Jensen 2017-05-19 16:14:57 +02:00
parent 64a3ca56d7
commit 5e3b284345
1 changed files with 8 additions and 0 deletions

View File

@ -366,6 +366,14 @@ void QKdeThemePrivate::refresh()
resources.fonts[QPlatformTheme::FixedFont] = fixedFont;
}
if (QFont *menuFont = kdeFont(readKdeSetting(QStringLiteral("menuFont"), kdeDirs, kdeVersion, kdeSettings))) {
resources.fonts[QPlatformTheme::MenuFont] = menuFont;
resources.fonts[QPlatformTheme::MenuBarFont] = new QFont(*menuFont);
}
if (QFont *toolBarFont = kdeFont(readKdeSetting(QStringLiteral("toolBarFont"), kdeDirs, kdeVersion, kdeSettings)))
resources.fonts[QPlatformTheme::ToolButtonFont] = toolBarFont;
qDeleteAll(kdeSettings);
}