summaryrefslogtreecommitdiffabout
path: root/microkde/KDGanttMinimizeSplitter.cpp
Unidiff
Diffstat (limited to 'microkde/KDGanttMinimizeSplitter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/KDGanttMinimizeSplitter.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp
index fb5d4e3..72c4e60 100644
--- a/microkde/KDGanttMinimizeSplitter.cpp
+++ b/microkde/KDGanttMinimizeSplitter.cpp
@@ -53,4 +53,5 @@
53#include <qvaluelist.h> 53#include <qvaluelist.h>
54#include <qcursor.h> 54#include <qcursor.h>
55#include <qframe.h>
55#ifndef KDGANTT_MASTER_CVS 56#ifndef KDGANTT_MASTER_CVS
56//#include "KDGanttMinimizeSplitter.moc" 57//#include "KDGanttMinimizeSplitter.moc"
@@ -65,4 +66,16 @@ static int mouseOffset;
65static int opaqueOldPos = -1; //### there's only one mouse, but this is a bit risky 66static int opaqueOldPos = -1; //### there's only one mouse, but this is a bit risky
66 67
68class KDRubberBand: public QFrame
69{
70public:
71 KDRubberBand( QWidget *parent, const char * name, WFlags f ) :QFrame ( parent, name, f ) {;}
72
73protected:
74 virtual void mousePressEvent ( QMouseEvent * )
75 {
76 close();
77 };
78
79};
67 80
68KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o, 81KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o,
@@ -190,6 +203,8 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
190 } 203 }
191 } 204 }
192 if ( s->rubberBand() ) 205 if ( s->rubberBand() ) {
193 s->rubberBand()->hide(); 206 //qDebug("hide rubberband ");
207 s->rubberBand()->close();
208 }
194 repaint(); 209 repaint();
195} 210}
@@ -682,5 +697,5 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
682#else 697#else
683 if ( !mRubberBand ) { 698 if ( !mRubberBand ) {
684 mRubberBand = new QFrame( 0, "rubber", WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop); 699 mRubberBand = new KDRubberBand( 0, "rubber", WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop);
685 mRubberBand->setFrameStyle( Box | Raised ); 700 mRubberBand->setFrameStyle( Box | Raised );
686 //mRubberBand->setPalette( QPalette ( Qt::red.light(),Qt::red.dark() ) ); 701 //mRubberBand->setPalette( QPalette ( Qt::red.light(),Qt::red.dark() ) );