summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2019-04-12 15:59:03 +0200
committerEirik Aavitsland <eirik.aavitsland@qt.io>2019-05-09 06:47:30 +0000
commit3d8ed3ba969ba958401dbf5e6760cf0788f1888e (patch)
tree4dce0fd268a7f2f1a1e11decba63b20d704d7cd7 /src/widgets/styles
parent2a79af6b5c67eba6f967c7443bf73bbe11206a62 (diff)
Fix: style sheet styling of background of triangular QTabWidget tabs
The triangular tab shape is not reproducible with setting style border options, so it should be painted with the usual code path, also when a custom background has been set. Fixes: QTBUG-72096 Change-Id: I7bc1c0579386b8ea7266ce6456534c2519d9addf Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index fc4efa18fb..2118bad9d6 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -4165,12 +4165,12 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) {
QRenderRule subRule = renderRule(w, opt, PseudoElement_TabBarTab);
QRect r = positionRect(w, subRule, PseudoElement_TabBarTab, opt->rect, opt->direction);
- if (ce == CE_TabBarTabShape && subRule.hasDrawable()) {
+ if (ce == CE_TabBarTabShape && subRule.hasDrawable() && tab->shape < QTabBar::TriangularNorth) {
subRule.drawRule(p, r);
return;
}
QStyleOptionTab tabCopy(*tab);
- subRule.configurePalette(&tabCopy.palette, QPalette::WindowText, QPalette::Window);
+ subRule.configurePalette(&tabCopy.palette, QPalette::WindowText, QPalette::Base);
QFont oldFont = p->font();
if (subRule.hasFont)
p->setFont(subRule.font);