diff options
author | Liang Qi <liang.qi@qt.io> | 2018-04-26 09:55:10 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-04-26 09:55:10 +0200 |
commit | 866b47916dfcf2823b8fc4df719f1ebf15acef70 (patch) | |
tree | a4eef09d00d407dec26b99b9f094bf1f5093dcb8 /src/widgets | |
parent | a9fc91466c2c143bea422d98af24755f43c2b97b (diff) | |
parent | 4bab1b0d7c2462ee9c5369c949b45bc4dedc1194 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
src/plugins/platforms/cocoa/qcocoawindow.mm
Change-Id: Ideea96d1b43d47b1d9b34e11c9986a88e240aa71
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qwindowcontainer.cpp | 1 | ||||
-rw-r--r-- | src/widgets/styles/qstylesheetstyle.cpp | 12 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/widgets/kernel/qwindowcontainer.cpp b/src/widgets/kernel/qwindowcontainer.cpp index d388327687..097931913e 100644 --- a/src/widgets/kernel/qwindowcontainer.cpp +++ b/src/widgets/kernel/qwindowcontainer.cpp @@ -48,6 +48,7 @@ #include <QMdiSubWindow> #endif #include <QAbstractScrollArea> +#include <QPainter> QT_BEGIN_NAMESPACE diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 8ba6504f87..98f2b8df2d 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -3850,7 +3850,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q if(hasStyleRule(w, PseudoElement_HeaderViewSection)) { QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewSection); if (!subRule.hasNativeBorder() || !subRule.baseStyleCanDraw() - || subRule.hasBackground() || subRule.hasPalette()) { + || subRule.hasBackground() || subRule.hasPalette() || subRule.hasFont) { ParentStyle::drawControl(ce, opt, p, w); return; } @@ -3887,12 +3887,14 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q QStyleOptionHeader hdr(*header); QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewSection); subRule.configurePalette(&hdr.palette, QPalette::ButtonText, QPalette::Button); - QFont oldFont = p->font(); - if (subRule.hasFont) + if (subRule.hasFont) { + QFont oldFont = p->font(); p->setFont(subRule.font.resolve(p->font())); - baseStyle()->drawControl(ce, &hdr, p, w); - if (subRule.hasFont) + ParentStyle::drawControl(ce, &hdr, p, w); p->setFont(oldFont); + } else { + baseStyle()->drawControl(ce, &hdr, p, w); + } return; } break; |