Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 3baa087..a483434 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -248,17 +248,6 @@ void VideoWidget::setToggleButton( int i, bool down ) { | |||
248 | } | 248 | } |
249 | } | 249 | } |
250 | 250 | ||
251 | void VideoWidget::paintButton( QPainter &p, int i ) { | ||
252 | |||
253 | Button &button = buttons[ i ]; | ||
254 | |||
255 | if ( button.isDown ) { | ||
256 | p.drawPixmap( upperLeftOfButtonMask, button.pixDown ); | ||
257 | } else { | ||
258 | p.drawPixmap( upperLeftOfButtonMask, button.pixUp ); | ||
259 | } | ||
260 | } | ||
261 | |||
262 | void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { | 251 | void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { |
263 | for ( unsigned int i = 0; i < buttons.count(); i++ ) { | 252 | for ( unsigned int i = 0; i < buttons.count(); i++ ) { |
264 | if ( event->state() == QMouseEvent::LeftButton ) { | 253 | if ( event->state() == QMouseEvent::LeftButton ) { |
@@ -403,14 +392,14 @@ void VideoWidget::paintEvent( QPaintEvent * pe) { | |||
403 | p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); | 392 | p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); |
404 | p.drawTiledPixmap( pe->rect(), pixBg, pe->rect().topLeft() ); | 393 | p.drawTiledPixmap( pe->rect(), pixBg, pe->rect().topLeft() ); |
405 | for ( unsigned int i = 0; i < buttons.count(); i++ ) { | 394 | for ( unsigned int i = 0; i < buttons.count(); i++ ) { |
406 | paintButton( p, i ); | 395 | paintButton( p, buttons[ i ] ); |
407 | } | 396 | } |
408 | QPainter p2( this ); | 397 | QPainter p2( this ); |
409 | p2.drawPixmap( pe->rect().topLeft(), pix ); | 398 | p2.drawPixmap( pe->rect().topLeft(), pix ); |
410 | } else { | 399 | } else { |
411 | QPainter p( this ); | 400 | QPainter p( this ); |
412 | for ( unsigned int i = 0; i < buttons.count(); i++ ) | 401 | for ( unsigned int i = 0; i < buttons.count(); i++ ) |
413 | paintButton( p, i ); | 402 | paintButton( p, buttons[ i ] ); |
414 | } | 403 | } |
415 | //slider->repaint( TRUE ); | 404 | //slider->repaint( TRUE ); |
416 | } | 405 | } |