-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 14 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.h | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 16 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.h | 1 |
5 files changed, 17 insertions, 17 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 022aa82..4301a67 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -217,5 +217,5 @@ void AudioWidget::resizeEvent( QResizeEvent * ) { - xoff = ( w - imgUp.width() ) / 2; - yoff = (( h - imgUp.height() ) / 2) - 10; - QPoint p( xoff, yoff ); + upperLeftOfButtonMask.rx() = ( w - imgUp.width() ) / 2; + upperLeftOfButtonMask.ry() = (( h - imgUp.height() ) / 2) - 10; + QPoint p = upperLeftOfButtonMask; @@ -344,5 +344,5 @@ void AudioWidget::paintButton( QPainter *p, int i ) { if ( buttons[i].isDown ) { - p->drawPixmap( xoff, yoff, *buttonPixDown[i] ); + p->drawPixmap( upperLeftOfButtonMask, *buttonPixDown[i] ); } else { - p->drawPixmap( xoff, yoff, *buttonPixUp[i] ); + p->drawPixmap( upperLeftOfButtonMask, *buttonPixUp[i] ); } @@ -383,4 +383,4 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { // The test to see if the mouse click is inside the button or not - int x = event->pos().x() - xoff; - int y = event->pos().y() - yoff; + int x = event->pos().x() - upperLeftOfButtonMask.x(); + int y = event->pos().y() - upperLeftOfButtonMask.y(); diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h index da22946..acf2dda 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.h +++ b/noncore/multimedia/opieplayer2/audiowidget.h @@ -109,3 +109,2 @@ private: QLineEdit time; - int xoff, yoff; bool isStreaming : 1; diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h index 044ab6c..7e6cb3b 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.h +++ b/noncore/multimedia/opieplayer2/mediawidget.h @@ -73,2 +73,4 @@ protected: QImage buttonMask; + + QPoint upperLeftOfButtonMask; }; diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 459f592..6ab6d7b 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp @@ -182,8 +182,8 @@ void VideoWidget::resizeEvent( QResizeEvent * ) { - xoff = 0;// ( imgUp->width() ) / 2; + upperLeftOfButtonMask.rx() = 0;// ( imgUp->width() ) / 2; if(w>h) - yoff = 0; + upperLeftOfButtonMask.ry() = 0; else - yoff = 185;//(( Vh - imgUp->height() ) / 2) - 10; - QPoint p( xoff, yoff ); + upperLeftOfButtonMask.ry() = 185;//(( Vh - imgUp->height() ) / 2) - 10; + QPoint p = upperLeftOfButtonMask; @@ -274,5 +274,5 @@ void VideoWidget::paintButton( QPainter *p, int i ) { if ( buttons[i].isDown ) { - p->drawPixmap( xoff, yoff, *buttonPixDown[i] ); + p->drawPixmap( upperLeftOfButtonMask, *buttonPixDown[i] ); } else { - p->drawPixmap( xoff, yoff, *buttonPixUp[i] ); + p->drawPixmap( upperLeftOfButtonMask, *buttonPixUp[i] ); } @@ -284,4 +284,4 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { // The test to see if the mouse click is inside the button or not - int x = event->pos().x() - xoff; - int y = event->pos().y() - yoff; + int x = event->pos().x() - upperLeftOfButtonMask.x(); + int y = event->pos().y() - upperLeftOfButtonMask.y(); diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h index a5500d7..2a9f1e0 100644 --- a/noncore/multimedia/opieplayer2/videowidget.h +++ b/noncore/multimedia/opieplayer2/videowidget.h @@ -107,3 +107,2 @@ private: // QPixmap *pixmaps[4]; - int xoff, yoff; |