summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qstylesheetstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/styles/qstylesheetstyle.cpp')
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index cead2ac..3d8dec6 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -3948,7 +3948,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
QFont oldFont = p->font();
if (subRule.hasFont)
p->setFont(subRule.font);
- if (subRule.hasBox()) {
+ if (subRule.hasBox() || !subRule.hasNativeBorder()) {
tabCopy.rect = ce == CE_TabBarTabShape ? subRule.borderRect(r)
: subRule.contentsRect(r);
QWindowsStyle::drawControl(ce, &tabCopy, p, w);
@@ -5702,6 +5702,15 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c
}
break;
}
+ case SE_TabBarTabText:
+ case SE_TabBarTabLeftButton:
+ case SE_TabBarTabRightButton: {
+ QRenderRule subRule = renderRule(w, opt, PseudoElement_TabBarTab);
+ if (subRule.hasBox() || !subRule.hasNativeBorder()) {
+ return ParentStyle::subElementRect(se, opt, w);
+ }
+ break;
+ }
#endif // QT_NO_TABBAR
case SE_DockWidgetCloseButton: