Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index c3e206c..3838e2c 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -118,5 +118,5 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye for ( int x = 0; x < imgUp.width(); x++ ) if ( !qRed( imgMask.pixel( x, y ) ) ) - line[x] = i + 1; + line[x] = button.command + 1; } } @@ -339,13 +339,14 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { Button &button = buttons[ i ]; + Command command = button.command; if ( event->state() == QMouseEvent::LeftButton ) { // The test to see if the mouse click is inside the button or not - bool isOnButton = isOverButton( event->pos() - upperLeftOfButtonMask, i ); + bool isOnButton = isOverButton( event->pos() - upperLeftOfButtonMask, command ); if ( isOnButton && !button.isHeld ) { button.isHeld = TRUE; toggleButton( button ); - switch (i) { + switch ( command ) { case VolumeUp: emit moreClicked(); @@ -360,4 +361,5 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { emit backClicked(); return; + default: break; } } else if ( !isOnButton && button.isHeld ) { @@ -372,5 +374,5 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { } qDebug("mouseEvent %d", i); - handleCommand( static_cast<Command>( i ), button.isDown ); + handleCommand( command, button.isDown ); } } |