From 63d4115d631736464ea9fbbdf495c5f72d79d77f Mon Sep 17 00:00:00 2001
From: Jens Bache-Wiig <jbache@trolltech.com>
Date: Thu, 18 Mar 2010 17:46:30 +0100
Subject: [PATCH] Fix single-pixel splitters with Oxygen style

Oxygen does some interesting tweaks with content
margins and event filters to draw dock widgets.
This had to be explicitly disabled in order to look
ok.
---
 src/plugins/coreplugin/manhattanstyle.cpp | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp
index 8260afa3b32..2696fdb7ec1 100644
--- a/src/plugins/coreplugin/manhattanstyle.cpp
+++ b/src/plugins/coreplugin/manhattanstyle.cpp
@@ -197,6 +197,7 @@ int ManhattanStyle::pixelMetric(PixelMetric metric, const QStyleOption *option,
         if (panelWidget(widget))
             retval = 16;
         break;
+    case PM_DockWidgetHandleExtent:
     case PM_DockWidgetSeparatorExtent:
         return 1;
     case PM_MenuPanelWidth:
@@ -257,10 +258,12 @@ void ManhattanStyle::polish(QWidget *widget)
 {
     QProxyStyle::polish(widget);
 
-    // OxygenStyle forces a rounded widget mask on toolbars
+    // OxygenStyle forces a rounded widget mask on toolbars and dock widgets
     if (baseStyle()->inherits("OxygenStyle")) {
-        if (qobject_cast<QToolBar*>(widget))
+        if (qobject_cast<QToolBar*>(widget) || qobject_cast<QDockWidget*>(widget)) {
             widget->removeEventFilter(baseStyle());
+            widget->setContentsMargins(0, 0, 0, 0);
+        }
     }
 
     if (panelWidget(widget)) {
@@ -424,6 +427,12 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
     }
 
     switch (element) {
+    case PE_IndicatorDockWidgetResizeHandle:
+        painter->fillRect(option->rect, Utils::StyleHelper::borderColor());
+        break;
+    case PE_FrameDockWidget:
+        QCommonStyle::drawPrimitive(element, option, painter, widget);
+        break;
     case PE_PanelLineEdit:
         {
             painter->save();
-- 
GitLab