summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/audiowidget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp14
1 files changed, 7 insertions, 7 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();