File r912150.diff of Package kdebase4-runtime

Subject: invalidate the caches of the style too and not just those shared with 
windec
From: wstephenson@suse.de
Bug: kde#163538
Patch-upstream: 912150
--- kstyles/oxygen/lib/helper.h	(revision 912149)
+++ kstyles/oxygen/lib/helper.h	(revision 912150)
@@ -38,7 +38,6 @@ public:
     explicit OxygenHelper(const QByteArray &componentName);
     virtual ~OxygenHelper() {}
 
-    void cleanupBeforeDelete() {OxygenHelper::invalidateCaches();}
     KSharedConfigPtr config() const;
     void reloadConfig();
 
--- kstyles/oxygen/oxygen.cpp	(revision 912149)
+++ kstyles/oxygen/oxygen.cpp	(revision 912150)
@@ -88,7 +88,7 @@ static const int gw = 2; // ie glowwidth
 static void cleanupBefore()
 {
     OxygenStyleHelper *h = globalHelper;
-    h->cleanupBeforeDelete();
+    h->invalidateCaches();
 }
 
 OxygenStyle::OxygenStyle() :
@@ -186,7 +186,7 @@ OxygenStyle::OxygenStyle() :
     setWidgetLayoutProp(WT_SpinBox, SpinBox::FrameWidth, 4);
     setWidgetLayoutProp(WT_SpinBox, SpinBox::ContentsMargin, 0);
     setWidgetLayoutProp(WT_SpinBox, SpinBox::ContentsMargin + Left, 1);
-    setWidgetLayoutProp(WT_SpinBox, SpinBox::ContentsMargin + Right, 4);
+    setWidgetLayoutProp(WT_SpinBox, SpinBox::ContentsMargin + Right, 0);
     setWidgetLayoutProp(WT_SpinBox, SpinBox::ContentsMargin + Top, 0);
     setWidgetLayoutProp(WT_SpinBox, SpinBox::ContentsMargin + Bot, 0);
     setWidgetLayoutProp(WT_SpinBox, SpinBox::ButtonWidth, 19);
@@ -200,7 +200,7 @@ OxygenStyle::OxygenStyle() :
     setWidgetLayoutProp(WT_ComboBox, ComboBox::FrameWidth, 4);
     setWidgetLayoutProp(WT_ComboBox, ComboBox::ContentsMargin, 0);
     setWidgetLayoutProp(WT_ComboBox, ComboBox::ContentsMargin + Left, 1);
-    setWidgetLayoutProp(WT_ComboBox, ComboBox::ContentsMargin + Right, 4);
+    setWidgetLayoutProp(WT_ComboBox, ComboBox::ContentsMargin + Right, 0);
     setWidgetLayoutProp(WT_ComboBox, ComboBox::ContentsMargin + Top, 0);
     setWidgetLayoutProp(WT_ComboBox, ComboBox::ContentsMargin + Bot, 0);
     setWidgetLayoutProp(WT_ComboBox, ComboBox::ButtonWidth, 19);
@@ -2206,7 +2206,7 @@ void OxygenStyle::polish(QWidget* widget
     }
     else if (qobject_cast<QDockWidget*>(widget))
     {
-        widget->setContentsMargins(4,3,4,4);
+        widget->setContentsMargins(3,0,3,3);
         widget->installEventFilter(this);
     }
     else if (qobject_cast<QToolBox*>(widget))
@@ -3418,9 +3418,12 @@ bool OxygenStyle::eventFilter(QObject *o
             QRect r = tb->rect();
             StyleOptions opts = NoFill;
 
-            QPainter p(tb);
-            p.setClipRegion(((QPaintEvent*)ev)->region());
-            renderSlab(&p, r, tb->palette().color(QPalette::Button), opts);
+            if(tb->frameShape() != QFrame::NoFrame) {
+                QPainter p(tb);
+                p.setClipRegion(((QPaintEvent*)ev)->region());
+
+                renderSlab(&p, r, tb->palette().color(QPalette::Button), opts);
+            }
         }
         return false;
     }
Index: kstyles/oxygen/lib/helper.h
===================================================================
Index: kstyles/oxygen/oxygen.cpp
===================================================================