diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-03-14 09:44:16 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-03-15 10:00:59 +0000 |
commit | 8fa998cd5172a4411984e95c08df70a1e4aacbc4 (patch) | |
tree | 48815f0bca9d6f52d6d686408d79228e96edf25a /src/templates | |
parent | 933e3f08d2a3b1fc4fbda8fea179d1e30789306e (diff) |
QQuickControlPrivate::themeFont(): clear system font's explicit attrs
The default system font must not have explicit attributes that would
mess with font inheritance. This is already handled by the QFont()
default constructor, but we must do it ourselves when we call
QPlatformTheme::font(SystemFont) directly.
Change-Id: Ia52e135411618e72cbf4618cffb9eec7924dc612
Task-number: QTBUG-50984
Task-number: QTBUG-51696
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/templates')
-rw-r--r-- | src/templates/qquickcontrol.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/templates/qquickcontrol.cpp b/src/templates/qquickcontrol.cpp index 53955f12..49c45e24 100644 --- a/src/templates/qquickcontrol.cpp +++ b/src/templates/qquickcontrol.cpp @@ -251,11 +251,15 @@ QFont QQuickControlPrivate::naturalControlFont(const QQuickItem *q) QFont QQuickControlPrivate::themeFont(QPlatformTheme::Font type) { if (QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) { - if (const QFont *font = theme->font(type)) - return *font; + if (const QFont *font = theme->font(type)) { + QFont f = *font; + if (type == QPlatformTheme::SystemFont) + f.resolve(0); + return f; + } } - return QGuiApplication::font(); + return QFont(); } /*! |