diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2009-07-23 15:04:18 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2009-07-23 15:10:37 (GMT) |
commit | f439550632c0552514f73d2778c7920811e225f7 (patch) | |
tree | 7e1c92cf62dfd1ba902a9eaee3adb9f91b1ad29f /src/gui | |
parent | 3ce677f1375bc723b5fd5a11ccc21f2af0c45ca1 (diff) | |
download | Qt-f439550632c0552514f73d2778c7920811e225f7.zip Qt-f439550632c0552514f73d2778c7920811e225f7.tar.gz Qt-f439550632c0552514f73d2778c7920811e225f7.tar.bz2 |
Fix incorrect button positioning on tabs
For tabs with RoundedWest or TriangularWest the button offset was
reversed on tab selection. This was very visible on windows where
they could actually move outside the tab border.
Task-number: 255139
Reviewed-by: paul
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/styles/qcommonstyle.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 308a0b8..ba28e75 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -2960,6 +2960,9 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt, horizontalShift *= -1; verticalShift *= -1; } + if (tab->shape == QTabBar::RoundedWest || tab->shape == QTabBar::TriangularWest) + horizontalShift = -horizontalShift; + tr.adjust(0, 0, horizontalShift, verticalShift); if (selected) { |