Diffstat (limited to 'microkde/KDGanttMinimizeSplitter.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | microkde/KDGanttMinimizeSplitter.cpp | 8 |
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, | |||
80 | s = parent; | 80 | s = parent; |
81 | setOrientation(o); | 81 | setOrientation(o); |
82 | setMouseTracking( true ); | 82 | setMouseTracking( true ); |
83 | mMouseDown = false; | ||
83 | //setMaximumHeight( 5 ); // test only | 84 | //setMaximumHeight( 5 ); // test only |
84 | } | 85 | } |
85 | 86 | ||
@@ -126,7 +127,7 @@ void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e ) | |||
126 | if ( e->button() == LeftButton ) { | 127 | if ( e->button() == LeftButton ) { |
127 | _activeButton = onButton( e->pos() ); | 128 | _activeButton = onButton( e->pos() ); |
128 | mouseOffset = s->pick(e->pos()); | 129 | mouseOffset = s->pick(e->pos()); |
129 | if ( _activeButton != 0) | 130 | mMouseDown = true; |
130 | repaint(); | 131 | repaint(); |
131 | updateCursor( e->pos() ); | 132 | updateCursor( e->pos() ); |
132 | } | 133 | } |
@@ -171,6 +172,7 @@ void KDGanttSplitterHandle::toggle() | |||
171 | 172 | ||
172 | void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e ) | 173 | void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e ) |
173 | { | 174 | { |
175 | mMouseDown = false; | ||
174 | if ( _activeButton != 0 ) { | 176 | if ( _activeButton != 0 ) { |
175 | if ( onButton( e->pos() ) == _activeButton ) | 177 | if ( onButton( e->pos() ) == _activeButton ) |
176 | { | 178 | { |
@@ -277,8 +279,12 @@ void KDGanttSplitterHandle::paintEvent( QPaintEvent * ) | |||
277 | QColor col; | 279 | QColor col; |
278 | if ( _activeButton ) | 280 | if ( _activeButton ) |
279 | col = colorGroup().background().dark( 250 ); | 281 | col = colorGroup().background().dark( 250 ); |
282 | else { | ||
283 | if ( mMouseDown ) | ||
284 | col = Qt::white; | ||
280 | else | 285 | else |
281 | col = colorGroup().background().dark( 150 ); | 286 | col = colorGroup().background().dark( 150 ); |
287 | } | ||
282 | //QColor col = backgroundColor().dark( 130 ); | 288 | //QColor col = backgroundColor().dark( 130 ); |
283 | p.setBrush( col ); | 289 | p.setBrush( col ); |
284 | p.setPen( col ); | 290 | p.setPen( col ); |