[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/oxygen-style-animated
From:       Hugo Pereira Da Costa <hugo.pereira () free ! fr>
Date:       2009-11-01 1:04:49
Message-ID: 1257037489.059416.1336.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1043189 by hpereiradacosta:

fixed RubberBand for QMainWindow (e.g. when moving ToolBars and DockWidgets around)

 M  +9 -1      oxygen.cpp  


--- branches/work/oxygen-style-animated/oxygen.cpp #1043188:1043189
@@ -41,6 +41,7 @@
 #include <QtGui/QDockWidget>
 #include <QtGui/QGraphicsView>
 #include <QtGui/QLineEdit>
+#include <QtGui/QMainWindow>
 #include <QtGui/QProgressBar>
 #include <QtGui/QPushButton>
 #include <QtGui/QRadioButton>
@@ -4470,7 +4471,14 @@
             {
 
                 mask->region = option->rect;
-                if( !( widget && qobject_cast<const QGraphicsView*>( widget->parent() ) ) )
+
+                // need to check on widget before removing inner region
+                // in order to still preserve rubberband in MainWindow and QGraphicsView
+                // in QMainWindow because it looks better
+                // in QGraphicsView because the painting fails completely otherwise
+                if( !( widget && (
+                    qobject_cast<const QGraphicsView*>( widget->parent() ) ||
+                    qobject_cast<const QMainWindow*>( widget->parent() ) ) ) )
                 { mask->region -= option->rect.adjusted(1,1,-1,-1); }
 
                 return true;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic