1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-16 18:03:22 +00:00
nixpkgs/pkgs/desktops/plasma-5/plasma-integration/D9070.patch
Thomas Tuegel d78f9f030b
plasma-integration: Upstream patch for Qt 5.8 font style names
Since Qt 5.8, font style names are handled in a way that prevents alternate
styles (bold, italic, etc.) from being selected for user interface fonts.

See also: https://phabricator.kde.org/D9070
2018-02-04 13:31:04 -06:00

25 lines
1.2 KiB
Diff

Index: src/platformtheme/kfontsettingsdata.cpp
===================================================================
--- src/platformtheme/kfontsettingsdata.cpp
+++ src/platformtheme/kfontsettingsdata.cpp
@@ -70,15 +70,18 @@
const KFontData &fontData = DefaultFontData[fontType];
cachedFont = new QFont(QLatin1String(fontData.FontName), fontData.Size, fontData.Weight);
cachedFont->setStyleHint(fontData.StyleHint);
- cachedFont->setStyleName(QLatin1String(fontData.StyleName));
const KConfigGroup configGroup(mKdeGlobals, fontData.ConfigGroupKey);
QString fontInfo = configGroup.readEntry(fontData.ConfigKey, QString());
//If we have serialized information for this font, restore it
//NOTE: We are not using KConfig directly because we can't call QFont::QFont from here
if (!fontInfo.isEmpty()) {
cachedFont->fromString(fontInfo);
+ } else {
+ // set the canonical stylename here, where it cannot override
+ // user-specific font attributes if those do not include a stylename.
+ cachedFont->setStyleName(QLatin1String(fontData.StyleName));
}
mFonts[fontType] = cachedFont;