From 5e3b284345f0f6c0da721a0de8748258965d0841 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 19 May 2017 16:14:57 +0200 Subject: 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 --- src/platformsupport/themes/genericunix/qgenericunixthemes.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/platformsupport/themes') diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp index 8dfae2ca0b..2b4c6a000f 100644 --- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp +++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp @@ -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); } -- cgit v1.2.3