diff options
author | Paul Wicking <paul.wicking@qt.io> | 2019-02-01 13:33:25 +0100 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2019-02-01 13:33:26 +0100 |
commit | 2bc362c9fa37455afbeb56e5f1852188ede3eab4 (patch) | |
tree | b89e3c2c082a0285e8cd91733ddbc772fe4362a5 /src/widgets/styles/qstylesheetstyle.cpp | |
parent | 5de981d3bc3df874f9df35a6899345f4f61fa951 (diff) | |
parent | 481db443d502c8ebc169b7256cb696428cf02199 (diff) |
Merge dev into 5.13
Change-Id: I8113c6d8735a151bd152e6096f8c8b8e63a05474
Diffstat (limited to 'src/widgets/styles/qstylesheetstyle.cpp')
-rw-r--r-- | src/widgets/styles/qstylesheetstyle.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index e261055c3c..e73d019408 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -2645,7 +2645,7 @@ void QStyleSheetStyle::setPalette(QWidget *w) QRenderRule rule = renderRule(w, PseudoElement_None, map[i].state | extendedPseudoClass(w)); if (i == 0) { if (!w->property("_q_styleSheetWidgetFont").isValid()) { - saveWidgetFont(w, w->font()); + saveWidgetFont(w, w->d_func()->localFont()); } updateStyleSheetFont(w); if (ew != w) @@ -6033,7 +6033,7 @@ void QStyleSheetStyle::updateStyleSheetFont(QWidget* w) const unsetStyleSheetFont(w); if (rule.font.resolve()) { - QFont wf = w->font(); + QFont wf = w->d_func()->localFont(); styleSheetCaches->customFontWidgets.insert(w, {wf, rule.font.resolve()}); QFont font = rule.font.resolve(wf); @@ -6041,7 +6041,9 @@ void QStyleSheetStyle::updateStyleSheetFont(QWidget* w) const w->setFont(font); } } else { - QFont font = rule.font.resolve(w->font()); + QFont wf = w->d_func()->localFont(); + QFont font = rule.font.resolve(wf); + font.resolve(wf.resolve() | rule.font.resolve()); if ((!w->isWindow() || w->testAttribute(Qt::WA_WindowPropagation)) && isNaturalChild(w) && qobject_cast<QWidget *>(w->parent())) { @@ -6049,10 +6051,11 @@ void QStyleSheetStyle::updateStyleSheetFont(QWidget* w) const font = font.resolve(static_cast<QWidget *>(w->parent())->font()); } - if (w->data->fnt == font) + if (wf.resolve() == font.resolve() && wf == font) return; w->data->fnt = font; + w->d_func()->directFontResolveMask = font.resolve(); QEvent e(QEvent::FontChange); QApplication::sendEvent(w, &e); |