From b15db4405b7b88a14edda0bde0b8f4293798d0f4 Mon Sep 17 00:00:00 2001
From: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Date: Fri, 24 May 2013 17:21:17 +0200
Subject: [PATCH] Fix tab overlap on Windows XP and Windows Vista

In Windows XP style, we actually use different values
based on tab position. That means we have to pass these
values through the tab style option.

Change-Id: I65904a9a57326003cfddef1a12ada5dda2fa2eab
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
---
 src/private/qquickstyleitem.cpp     | 2 +-
 src/styles/Desktop/TabViewStyle.qml | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/private/qquickstyleitem.cpp b/src/private/qquickstyleitem.cpp
index 8ed83dee8..9d9bdc33e 100644
--- a/src/private/qquickstyleitem.cpp
+++ b/src/private/qquickstyleitem.cpp
@@ -886,7 +886,7 @@ int QQuickStyleItem::pixelMetric(const QString &metric)
     else if (metric == "taboverlap")
         return qApp->style()->pixelMetric(QStyle::PM_TabBarTabOverlap, 0 );
     else if (metric == "tabbaseoverlap")
-        return qApp->style()->pixelMetric(QStyle::PM_TabBarBaseOverlap, 0 );
+        return qApp->style()->pixelMetric(QStyle::PM_TabBarBaseOverlap, m_styleoption );
     else if (metric == "tabhspace")
         return qApp->style()->pixelMetric(QStyle::PM_TabBarTabHSpace, 0 );
     else if (metric == "indicatorwidth")
diff --git a/src/styles/Desktop/TabViewStyle.qml b/src/styles/Desktop/TabViewStyle.qml
index 75c41223c..9cd34705c 100644
--- a/src/styles/Desktop/TabViewStyle.qml
+++ b/src/styles/Desktop/TabViewStyle.qml
@@ -49,7 +49,12 @@ Style {
     property int tabOverlap: __barstyle.pixelMetric("taboverlap");
     property int frameOverlap: __barstyle.pixelMetric("tabbaseoverlap");
 
-    property StyleItem __barstyle: StyleItem { elementType: "tabbar" ; visible: false }
+    property StyleItem __barstyle: StyleItem {
+        elementType: "tab"
+        hints: [control.tabPosition === Qt.TopEdge ? "Top" : "Bottom"]
+        visible: false
+    }
+
     property Component frame: StyleItem {
         id: styleitem
         anchors.fill: parent
-- 
GitLab