From f439550632c0552514f73d2778c7920811e225f7 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Thu, 23 Jul 2009 17:04:18 +0200 Subject: 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 --- src/gui/styles/qcommonstyle.cpp | 3 +++ 1 file changed, 3 insertions(+) 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) { -- cgit v0.12