author | simon <simon> | 2002-12-08 22:39:53 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-08 22:39:53 (UTC) |
commit | 8b72df0bb25ca5a0791756b2444fc6a1ce361082 (patch) (unidiff) | |
tree | 19a7b23fe1d5256d461fe988ba82c359d75a8caf /noncore/multimedia/opieplayer2/videowidget.cpp | |
parent | bada5d6377a428a96527d465903df7fbabc9d337 (diff) | |
download | opie-8b72df0bb25ca5a0791756b2444fc6a1ce361082.zip opie-8b72df0bb25ca5a0791756b2444fc6a1ce361082.tar.gz opie-8b72df0bb25ca5a0791756b2444fc6a1ce361082.tar.bz2 |
- merged xoff/yoff into a QPointe member variable, shared in the base class
Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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 | |||
@@ -180,12 +180,12 @@ void VideoWidget::resizeEvent( QResizeEvent * ) { | |||
180 | slider->setFocusPolicy( QWidget::NoFocus ); | 180 | slider->setFocusPolicy( QWidget::NoFocus ); |
181 | slider->setBackgroundPixmap( pixBg ); | 181 | slider->setBackgroundPixmap( pixBg ); |
182 | 182 | ||
183 | xoff = 0;// ( imgUp->width() ) / 2; | 183 | upperLeftOfButtonMask.rx() = 0;// ( imgUp->width() ) / 2; |
184 | if(w>h) | 184 | if(w>h) |
185 | yoff = 0; | 185 | upperLeftOfButtonMask.ry() = 0; |
186 | else | 186 | else |
187 | yoff = 185;//(( Vh - imgUp->height() ) / 2) - 10; | 187 | upperLeftOfButtonMask.ry() = 185;//(( Vh - imgUp->height() ) / 2) - 10; |
188 | QPoint p( xoff, yoff ); | 188 | QPoint p = upperLeftOfButtonMask; |
189 | 189 | ||
190 | QPixmap *pixUp = combineVImageWithBackground( imgUp, pixBg, p ); | 190 | QPixmap *pixUp = combineVImageWithBackground( imgUp, pixBg, p ); |
191 | QPixmap *pixDn = combineVImageWithBackground( imgDn, pixBg, p ); | 191 | QPixmap *pixDn = combineVImageWithBackground( imgDn, pixBg, p ); |
@@ -272,9 +272,9 @@ void VideoWidget::toggleButton( int i ) { | |||
272 | void VideoWidget::paintButton( QPainter *p, int i ) { | 272 | void VideoWidget::paintButton( QPainter *p, int i ) { |
273 | 273 | ||
274 | if ( buttons[i].isDown ) { | 274 | if ( buttons[i].isDown ) { |
275 | p->drawPixmap( xoff, yoff, *buttonPixDown[i] ); | 275 | p->drawPixmap( upperLeftOfButtonMask, *buttonPixDown[i] ); |
276 | } else { | 276 | } else { |
277 | p->drawPixmap( xoff, yoff, *buttonPixUp[i] ); | 277 | p->drawPixmap( upperLeftOfButtonMask, *buttonPixUp[i] ); |
278 | } | 278 | } |
279 | } | 279 | } |
280 | 280 | ||
@@ -282,8 +282,8 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { | |||
282 | for ( unsigned int i = 0; i < buttons.size(); i++ ) { | 282 | for ( unsigned int i = 0; i < buttons.size(); i++ ) { |
283 | if ( event->state() == QMouseEvent::LeftButton ) { | 283 | if ( event->state() == QMouseEvent::LeftButton ) { |
284 | // The test to see if the mouse click is inside the button or not | 284 | // The test to see if the mouse click is inside the button or not |
285 | int x = event->pos().x() - xoff; | 285 | int x = event->pos().x() - upperLeftOfButtonMask.x(); |
286 | int y = event->pos().y() - yoff; | 286 | int y = event->pos().y() - upperLeftOfButtonMask.y(); |
287 | 287 | ||
288 | bool isOnButton = ( x > 0 && y > 0 && x < buttonMask.width() | 288 | bool isOnButton = ( x > 0 && y > 0 && x < buttonMask.width() |
289 | && y < buttonMask.height() | 289 | && y < buttonMask.height() |