summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--microkde/KDGanttMinimizeSplitter.cpp8
-rw-r--r--microkde/KDGanttMinimizeSplitter.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp
index 84edc0d..c60b566 100644
--- a/microkde/KDGanttMinimizeSplitter.cpp
+++ b/microkde/KDGanttMinimizeSplitter.cpp
@@ -81,4 +81,5 @@ KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o,
setOrientation(o);
setMouseTracking( true );
+ mMouseDown = false;
//setMaximumHeight( 5 ); // test only
}
@@ -127,5 +128,5 @@ void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e )
_activeButton = onButton( e->pos() );
mouseOffset = s->pick(e->pos());
- if ( _activeButton != 0)
+ mMouseDown = true;
repaint();
updateCursor( e->pos() );
@@ -172,4 +173,5 @@ void KDGanttSplitterHandle::toggle()
void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
{
+ mMouseDown = false;
if ( _activeButton != 0 ) {
if ( onButton( e->pos() ) == _activeButton )
@@ -278,6 +280,10 @@ void KDGanttSplitterHandle::paintEvent( QPaintEvent * )
if ( _activeButton )
col = colorGroup().background().dark( 250 );
+ else {
+ if ( mMouseDown )
+ col = Qt::white;
else
col = colorGroup().background().dark( 150 );
+ }
//QColor col = backgroundColor().dark( 130 );
p.setBrush( col );
diff --git a/microkde/KDGanttMinimizeSplitter.h b/microkde/KDGanttMinimizeSplitter.h
index 8120d14..84d3d8e 100644
--- a/microkde/KDGanttMinimizeSplitter.h
+++ b/microkde/KDGanttMinimizeSplitter.h
@@ -170,4 +170,5 @@ protected:
private:
+ bool mMouseDown;
QSize mSizeHint;
bool mUseOffset;