-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 419c3ae..a4e6b6e 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -183,29 +183,33 @@ QPixmap *maskVPixToMask( QPixmap pix, QBitmap mask ) { | |||
183 | void VideoWidget::resizeEvent( QResizeEvent * ) { | 183 | void VideoWidget::resizeEvent( QResizeEvent * ) { |
184 | int h = height(); | 184 | int h = height(); |
185 | int w = width(); | 185 | int w = width(); |
186 | int Vh = 160; | 186 | int Vh = 160; |
187 | //videoFrame->height(); | 187 | //videoFrame->height(); |
188 | int Vw = 220; | 188 | int Vw = 220; |
189 | //videoFrame->width(); | 189 | //videoFrame->width(); |
190 | // songInfo.setGeometry( QRect( 2, 10, w - 4, 20 ) ); | 190 | // songInfo.setGeometry( QRect( 2, 10, w - 4, 20 ) ); |
191 | 191 | ||
192 | slider->setFixedWidth( w - 110 ); | 192 | slider->setFixedWidth( w - 110 ); |
193 | slider->setGeometry( QRect( 15, h - 30, w - 90, 20 ) ); | 193 | slider->setGeometry( QRect( 15, h - 30, w - 90, 20 ) ); |
194 | slider->setBackgroundOrigin( QWidget::ParentOrigin ); | 194 | slider->setBackgroundOrigin( QWidget::ParentOrigin ); |
195 | slider->setFocusPolicy( QWidget::NoFocus ); | ||
196 | make slider->setBackgroundPixmap( *pixBg ); | ||
197 | |||
195 | // time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) ); | 198 | // time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) ); |
196 | xoff = 0;// ( imgUp->width() ) / 2; | 199 | xoff = 0;// ( imgUp->width() ) / 2; |
197 | yoff = 180;//(( Vh - imgUp->height() ) / 2) - 10; | 200 | yoff = 180;//(( Vh - imgUp->height() ) / 2) - 10; |
198 | QPoint p( xoff, yoff ); | 201 | QPoint p( xoff, yoff ); |
199 | 202 | ||
203 | |||
200 | QPixmap *pixUp = combineVImageWithBackground( *imgUp, *pixBg, p ); | 204 | QPixmap *pixUp = combineVImageWithBackground( *imgUp, *pixBg, p ); |
201 | QPixmap *pixDn = combineVImageWithBackground( *imgDn, *pixBg, p ); | 205 | QPixmap *pixDn = combineVImageWithBackground( *imgDn, *pixBg, p ); |
202 | 206 | ||
203 | for ( int i = 0; i < 7; i++ ) { | 207 | for ( int i = 0; i < 7; i++ ) { |
204 | if ( !masks[i]->isNull() ) { | 208 | if ( !masks[i]->isNull() ) { |
205 | delete buttonPixUp[i]; | 209 | delete buttonPixUp[i]; |
206 | delete buttonPixDown[i]; | 210 | delete buttonPixDown[i]; |
207 | buttonPixUp[i] = maskVPixToMask( *pixUp, *masks[i] ); | 211 | buttonPixUp[i] = maskVPixToMask( *pixUp, *masks[i] ); |
208 | buttonPixDown[i] = maskVPixToMask( *pixDn, *masks[i] ); | 212 | buttonPixDown[i] = maskVPixToMask( *pixDn, *masks[i] ); |
209 | } | 213 | } |
210 | } | 214 | } |
211 | 215 | ||
@@ -331,25 +335,24 @@ void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { | |||
331 | } | 335 | } |
332 | } | 336 | } |
333 | 337 | ||
334 | 338 | ||
335 | void VideoWidget::makeVisible() { | 339 | void VideoWidget::makeVisible() { |
336 | if ( mediaPlayerState->fullscreen() ) { | 340 | if ( mediaPlayerState->fullscreen() ) { |
337 | setBackgroundMode( QWidget::NoBackground ); | 341 | setBackgroundMode( QWidget::NoBackground ); |
338 | showFullScreen(); | 342 | showFullScreen(); |
339 | resize( qApp->desktop()->size() ); | 343 | resize( qApp->desktop()->size() ); |
340 | slider->hide(); | 344 | slider->hide(); |
341 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); | 345 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); |
342 | } else { | 346 | } else { |
343 | setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); | ||
344 | showNormal(); | 347 | showNormal(); |
345 | showMaximized(); | 348 | showMaximized(); |
346 | slider->show(); | 349 | slider->show(); |
347 | videoFrame->setGeometry( QRect( 10, 20, 220, 160 ) ); | 350 | videoFrame->setGeometry( QRect( 10, 20, 220, 160 ) ); |
348 | } | 351 | } |
349 | } | 352 | } |
350 | 353 | ||
351 | 354 | ||
352 | void VideoWidget::paintEvent( QPaintEvent * pe) { | 355 | void VideoWidget::paintEvent( QPaintEvent * pe) { |
353 | QPainter p( this ); | 356 | QPainter p( this ); |
354 | 357 | ||
355 | if ( mediaPlayerState->fullscreen() ) { | 358 | if ( mediaPlayerState->fullscreen() ) { |