diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-09-04 11:35:17 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-09-04 11:35:17 (GMT) |
commit | b576bca55f88ed749a0a2b409be986dbf6b96b0a (patch) | |
tree | 69789d636ff2328cfc4101851f9a28de4a2a825e /src/gui/styles | |
parent | 0b8062f5fbd7622a528ce61b767d00fbcdfc74a0 (diff) | |
parent | 9d85dcf10d580a45c261e3e1a8d8df7d41cb9437 (diff) | |
download | Qt-b576bca55f88ed749a0a2b409be986dbf6b96b0a.zip Qt-b576bca55f88ed749a0a2b409be986dbf6b96b0a.tar.gz Qt-b576bca55f88ed749a0a2b409be986dbf6b96b0a.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qcommonstyle.cpp | 1 | ||||
-rw-r--r-- | src/gui/styles/qstylesheetstyle.cpp | 11 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 41f9ec0..7fefb19 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -1882,7 +1882,6 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, break; case CE_TabBarTabLabel: if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) { - // ### consider merging this with SE_TabBarTabText QStyleOptionTabV3 tabV2(*tab); QRect tr = tabV2.rect; bool verticalTabs = tabV2.shape == QTabBar::RoundedEast 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: |