author | zautrix <zautrix> | 2005-04-01 22:32:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-01 22:32:18 (UTC) |
commit | 02bdd5a73feb7bd2431c5492c7bbf663f28efbd8 (patch) (unidiff) | |
tree | c87553742dfa351f4d4ae2308d68dd87cc400304 /microkde | |
parent | efb66afca923f23a94b19da1fa12555956e70844 (diff) | |
download | kdepimpi-02bdd5a73feb7bd2431c5492c7bbf663f28efbd8.zip kdepimpi-02bdd5a73feb7bd2431c5492c7bbf663f28efbd8.tar.gz kdepimpi-02bdd5a73feb7bd2431c5492c7bbf663f28efbd8.tar.bz2 |
nf
-rw-r--r-- | microkde/KDGanttMinimizeSplitter.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp index 6cb1f31..253175e 100644 --- a/microkde/KDGanttMinimizeSplitter.cpp +++ b/microkde/KDGanttMinimizeSplitter.cpp | |||
@@ -250,61 +250,70 @@ QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions() | |||
250 | } | 250 | } |
251 | else if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Down || | 251 | else if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Down || |
252 | _collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Up ) { | 252 | _collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Up ) { |
253 | int mid = width()/2 + voffset[i]; | 253 | int mid = width()/2 + voffset[i]; |
254 | arr.setPoints( 3, | 254 | arr.setPoints( 3, |
255 | mid - sw + 4, 1-yyy, | 255 | mid - sw + 4, 1-yyy, |
256 | mid, sw-3-yyy, | 256 | mid, sw-3-yyy, |
257 | mid + sw -4, 1-yyy); | 257 | mid + sw -4, 1-yyy); |
258 | } | 258 | } |
259 | list.append( arr ); | 259 | list.append( arr ); |
260 | } | 260 | } |
261 | return list; | 261 | return list; |
262 | } | 262 | } |
263 | 263 | ||
264 | void KDGanttSplitterHandle::paintEvent( QPaintEvent * ) | 264 | void KDGanttSplitterHandle::paintEvent( QPaintEvent * ) |
265 | { | 265 | { |
266 | QPixmap buffer( size() ); | 266 | QPixmap buffer( size() ); |
267 | QPainter p( &buffer ); | 267 | QPainter p( &buffer ); |
268 | 268 | ||
269 | //LR | 269 | //LR |
270 | // Draw the splitter rectangle | 270 | // Draw the splitter rectangle |
271 | p.setBrush( colorGroup().background() ); | 271 | p.setBrush( colorGroup().background() ); |
272 | p.setPen( colorGroup().foreground() ); | 272 | p.setPen( colorGroup().foreground() ); |
273 | //p.drawRect( rect() ); | 273 | //p.drawRect( rect() ); |
274 | buffer.fill( colorGroup().background() ); | 274 | #ifndef DESKTOP_VERSION |
275 | if ( mMouseDown ) | ||
276 | buffer.fill( QColor( 242,27,255 ) ); | ||
277 | else | ||
278 | #endif | ||
279 | buffer.fill( colorGroup().background() ); | ||
275 | //buffer.fill( backgroundColor() ); | 280 | //buffer.fill( backgroundColor() ); |
276 | // parentWidget()->style().drawPrimitive( QStyle::PE_Panel, &p, rect(), parentWidget()->colorGroup()); | 281 | // parentWidget()->style().drawPrimitive( QStyle::PE_Panel, &p, rect(), parentWidget()->colorGroup()); |
277 | 282 | ||
278 | int sw = 8; // Hardcoded, given I didn't use styles anymore, I didn't like to use their size | 283 | int sw = 8; // Hardcoded, given I didn't use styles anymore, I didn't like to use their size |
279 | 284 | ||
280 | // arrow color | 285 | // arrow color |
281 | QColor col; | 286 | QColor col; |
282 | if ( _activeButton ) | 287 | if ( _activeButton ) |
283 | col = colorGroup().background().dark( 250 ); | 288 | col = colorGroup().background().dark( 250 ); |
284 | else { | 289 | else { |
285 | if ( mMouseDown ) | 290 | if ( mMouseDown ) |
286 | col = Qt::white; | 291 | #ifndef DESKTOP_VERSION |
292 | col = QColor( 178,18,188);//QColor( 242,27,255 );//Qt::white; | ||
293 | #else | ||
294 | col = Qt::white; | ||
295 | #endif | ||
287 | else | 296 | else |
288 | col = colorGroup().background().dark( 150 ); | 297 | col = colorGroup().background().dark( 150 ); |
289 | } | 298 | } |
290 | //QColor col = backgroundColor().dark( 130 ); | 299 | //QColor col = backgroundColor().dark( 130 ); |
291 | p.setBrush( col ); | 300 | p.setBrush( col ); |
292 | p.setPen( col ); | 301 | p.setPen( col ); |
293 | 302 | ||
294 | QValueList<QPointArray> list = buttonRegions(); | 303 | QValueList<QPointArray> list = buttonRegions(); |
295 | int index = 1; | 304 | int index = 1; |
296 | if ( mUseOffset ) | 305 | if ( mUseOffset ) |
297 | p.translate( 0, 1 ); | 306 | p.translate( 0, 1 ); |
298 | for ( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) { | 307 | for ( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) { |
299 | if ( index == _activeButton ) { | 308 | if ( index == _activeButton ) { |
300 | 309 | ||
301 | /* | 310 | /* |
302 | if ( ! _collapsed ) { | 311 | if ( ! _collapsed ) { |
303 | p.save(); | 312 | p.save(); |
304 | // p.translate( parentWidget()->style().pixelMetric( QStyle::PM_ButtonShiftHorizontal ), | 313 | // p.translate( parentWidget()->style().pixelMetric( QStyle::PM_ButtonShiftHorizontal ), |
305 | // parentWidget()->style().pixelMetric( QStyle::PM_ButtonShiftVertical ) ); | 314 | // parentWidget()->style().pixelMetric( QStyle::PM_ButtonShiftVertical ) ); |
306 | p.translate( -1, 0 ); | 315 | p.translate( -1, 0 ); |
307 | p.drawPolygon( *it, true ); | 316 | p.drawPolygon( *it, true ); |
308 | p.restore(); } else | 317 | p.restore(); } else |
309 | */ | 318 | */ |
310 | p.drawPolygon( *it, true ); | 319 | p.drawPolygon( *it, true ); |