summaryrefslogtreecommitdiffabout
path: root/microkde/KDGanttMinimizeSplitter.cpp
Side-by-side diff
Diffstat (limited to 'microkde/KDGanttMinimizeSplitter.cpp') (more/less context) (show whitespace changes)
-rw-r--r--microkde/KDGanttMinimizeSplitter.cpp8
1 files changed, 7 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
@@ -80,6 +80,7 @@ KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o,
s = parent;
setOrientation(o);
setMouseTracking( true );
+ mMouseDown = false;
//setMaximumHeight( 5 ); // test only
}
@@ -126,7 +127,7 @@ void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e )
if ( e->button() == LeftButton ) {
_activeButton = onButton( e->pos() );
mouseOffset = s->pick(e->pos());
- if ( _activeButton != 0)
+ mMouseDown = true;
repaint();
updateCursor( e->pos() );
}
@@ -171,6 +172,7 @@ void KDGanttSplitterHandle::toggle()
void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
{
+ mMouseDown = false;
if ( _activeButton != 0 ) {
if ( onButton( e->pos() ) == _activeButton )
{
@@ -277,8 +279,12 @@ void KDGanttSplitterHandle::paintEvent( QPaintEvent * )
QColor col;
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 );
p.setPen( col );