summaryrefslogtreecommitdiffabout
path: root/microkde/KDGanttMinimizeSplitter.cpp
Unidiff
Diffstat (limited to 'microkde/KDGanttMinimizeSplitter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/KDGanttMinimizeSplitter.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp
index 029f14b..ea3a329 100644
--- a/microkde/KDGanttMinimizeSplitter.cpp
+++ b/microkde/KDGanttMinimizeSplitter.cpp
@@ -191,2 +191,4 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
191 } 191 }
192 if ( s->rubberBand() )
193 s->rubberBand()->hide();
192 repaint(); 194 repaint();
@@ -436,3 +438,2 @@ static QSize minSizeHint( const QWidget* w )
436 438
437
438/*! 439/*!
@@ -444,2 +445,3 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *n
444{ 445{
446 mRubberBand = 0;
445 mFirstHandle = 0; 447 mFirstHandle = 0;
@@ -458,2 +460,4 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Orientation o, QWidget *parent
458{ 460{
461
462 mRubberBand = 0;
459 mFirstHandle = 0; 463 mFirstHandle = 0;
@@ -474,2 +478,4 @@ KDGanttMinimizeSplitter::~KDGanttMinimizeSplitter()
474#endif 478#endif
479 if ( mRubberBand )
480 delete mRubberBand;
475} 481}
@@ -644,2 +650,3 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
644{ 650{
651#ifdef DESKTOP_VERSION
645 QPainter paint( this ); 652 QPainter paint( this );
@@ -669,2 +676,25 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
669 opaqueOldPos = p; 676 opaqueOldPos = p;
677#else
678 if ( !mRubberBand ) {
679 mRubberBand = new QFrame( 0, "rubber", WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop);
680 mRubberBand->setFrameStyle( Box | Raised );
681 mRubberBand->setPalette( QPalette ( Qt::green.light(),Qt::green.dark() ) );
682 }
683 QRect r = contentsRect();
684 const int rBord = 5; //Themable????
685 int sw = style().splitterWidth();
686 if ( orient == Horizontal ) {
687 if ( p >= 0 ) {
688 QPoint geo = mapToGlobal (QPoint ( p + sw/2 - rBord, r.y()));
689 mRubberBand->setGeometry( geo.x(), geo.y(), 2*rBord, r.height() );
690 }
691 } else {
692 if ( p >= 0 ) {
693 QPoint geo = mapToGlobal (QPoint ( r.x(), p + sw/2 - rBord));
694 mRubberBand->setGeometry( geo.x(), geo.y(), r.width(), 2*rBord);
695 }
696 }
697 opaqueOldPos = p;
698 mRubberBand->show();
699#endif
670} 700}