summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/themes/genericunix
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-05-13 08:04:58 +0200
committerLiang Qi <liang.qi@qt.io>2019-05-13 08:04:58 +0200
commit388fe97f2a54089544dff0ed3af6ca70bf604716 (patch)
tree163b47974c625849726804337bd667c942dfbc77 /src/platformsupport/themes/genericunix
parenta0c4b6f34546bdd22167a76a0540d37e9a37c0cf (diff)
parent591116490cf313808e8ba05ddd066656a1d1a566 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: src/corelib/tools/qstring.cpp Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
Diffstat (limited to 'src/platformsupport/themes/genericunix')
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
index 7b3f9b624a..70d5616075 100644
--- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
+++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp
@@ -76,6 +76,7 @@
QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(qLcTray)
+Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts")
ResourceHelper::ResourceHelper()
{
@@ -96,6 +97,7 @@ const char *QGenericUnixTheme::name = "generic";
// Default system font, corresponding to the value returned by 4.8 for
// XRender/FontConfig which we can now assume as default.
static const char defaultSystemFontNameC[] = "Sans Serif";
+static const char defaultFixedFontNameC[] = "monospace";
enum { defaultSystemFontSize = 9 };
#if !defined(QT_NO_DBUS) && !defined(QT_NO_SYSTEMTRAYICON)
@@ -136,9 +138,10 @@ public:
QGenericUnixThemePrivate()
: QPlatformThemePrivate()
, systemFont(QLatin1String(defaultSystemFontNameC), defaultSystemFontSize)
- , fixedFont(QStringLiteral("monospace"), systemFont.pointSize())
+ , fixedFont(QLatin1String(defaultFixedFontNameC), systemFont.pointSize())
{
fixedFont.setStyleHint(QFont::TypeWriter);
+ qCDebug(lcQpaFonts) << "default fonts: system" << systemFont << "fixed" << fixedFont;
}
const QFont systemFont;
@@ -384,7 +387,7 @@ void QKdeThemePrivate::refresh()
if (QFont *fixedFont = kdeFont(readKdeSetting(QStringLiteral("fixed"), kdeDirs, kdeVersion, kdeSettings))) {
resources.fonts[QPlatformTheme::FixedFont] = fixedFont;
} else {
- fixedFont = new QFont(QLatin1String(defaultSystemFontNameC), defaultSystemFontSize);
+ fixedFont = new QFont(QLatin1String(defaultFixedFontNameC), defaultSystemFontSize);
fixedFont->setStyleHint(QFont::TypeWriter);
resources.fonts[QPlatformTheme::FixedFont] = fixedFont;
}
@@ -397,6 +400,8 @@ void QKdeThemePrivate::refresh()
if (QFont *toolBarFont = kdeFont(readKdeSetting(QStringLiteral("toolBarFont"), kdeDirs, kdeVersion, kdeSettings)))
resources.fonts[QPlatformTheme::ToolButtonFont] = toolBarFont;
+ qCDebug(lcQpaFonts) << "default fonts: system" << resources.fonts[QPlatformTheme::SystemFont]
+ << "fixed" << resources.fonts[QPlatformTheme::FixedFont];
qDeleteAll(kdeSettings);
}
@@ -710,8 +715,9 @@ public:
QString fontName = gtkFontName.left(split);
systemFont = new QFont(fontName, size);
- fixedFont = new QFont(QLatin1String("monospace"), systemFont->pointSize());
+ fixedFont = new QFont(QLatin1String(defaultFixedFontNameC), systemFont->pointSize());
fixedFont->setStyleHint(QFont::TypeWriter);
+ qCDebug(lcQpaFonts) << "default fonts: system" << systemFont << "fixed" << fixedFont;
}
mutable QFont *systemFont;