author | harlekin <harlekin> | 2002-08-17 12:09:45 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-17 12:09:45 (UTC) |
commit | 313a4f44a645a0b58855ac18cdbf7642fe93a753 (patch) (unidiff) | |
tree | e2e1765ddfedb3d79e7c95cba507b46861f4532f /noncore/multimedia/opieplayer2/videowidget.cpp | |
parent | bf3106b139fdcb32c0abdab9de9ade2d897c2147 (diff) | |
download | opie-313a4f44a645a0b58855ac18cdbf7642fe93a753.zip opie-313a4f44a645a0b58855ac18cdbf7642fe93a753.tar.gz opie-313a4f44a645a0b58855ac18cdbf7642fe93a753.tar.bz2 |
fix visual dirt when returning from fullscreen
Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 6f3842f..ddb4d74 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -356,48 +356,49 @@ void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { | |||
356 | } | 356 | } |
357 | mouseMoveEvent( event ); | 357 | mouseMoveEvent( event ); |
358 | } | 358 | } |
359 | 359 | ||
360 | void VideoWidget::showEvent( QShowEvent* ) { | 360 | void VideoWidget::showEvent( QShowEvent* ) { |
361 | QMouseEvent event( QEvent::MouseMove, QPoint( 0, 0 ), 0, 0 ); | 361 | QMouseEvent event( QEvent::MouseMove, QPoint( 0, 0 ), 0, 0 ); |
362 | mouseMoveEvent( &event ); | 362 | mouseMoveEvent( &event ); |
363 | } | 363 | } |
364 | 364 | ||
365 | 365 | ||
366 | void VideoWidget::backToNormal() { | 366 | void VideoWidget::backToNormal() { |
367 | mediaPlayerState->setFullscreen( FALSE ); | 367 | mediaPlayerState->setFullscreen( FALSE ); |
368 | makeVisible(); | 368 | makeVisible(); |
369 | } | 369 | } |
370 | 370 | ||
371 | void VideoWidget::makeVisible() { | 371 | void VideoWidget::makeVisible() { |
372 | if ( mediaPlayerState->fullscreen() ) { | 372 | if ( mediaPlayerState->fullscreen() ) { |
373 | setBackgroundMode( QWidget::NoBackground ); | 373 | setBackgroundMode( QWidget::NoBackground ); |
374 | showFullScreen(); | 374 | showFullScreen(); |
375 | resize( qApp->desktop()->size() ); | 375 | resize( qApp->desktop()->size() ); |
376 | slider->hide(); | 376 | slider->hide(); |
377 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); | 377 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); |
378 | 378 | ||
379 | } else { | 379 | } else { |
380 | showNormal(); | ||
380 | showMaximized(); | 381 | showMaximized(); |
381 | setBackgroundPixmap( *pixBg ); | 382 | setBackgroundPixmap( *pixBg ); |
382 | if ( mediaPlayerState->streaming() ) { | 383 | if ( mediaPlayerState->streaming() ) { |
383 | slider->hide(); | 384 | slider->hide(); |
384 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 385 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
385 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 386 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
386 | } else { | 387 | } else { |
387 | slider->show(); | 388 | slider->show(); |
388 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 389 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
389 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 390 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
390 | } | 391 | } |
391 | videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); | 392 | videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); |
392 | qApp->processEvents(); | 393 | qApp->processEvents(); |
393 | } | 394 | } |
394 | } | 395 | } |
395 | 396 | ||
396 | 397 | ||
397 | void VideoWidget::paintEvent( QPaintEvent * pe) { | 398 | void VideoWidget::paintEvent( QPaintEvent * pe) { |
398 | QPainter p( this ); | 399 | QPainter p( this ); |
399 | 400 | ||
400 | if ( mediaPlayerState->fullscreen() ) { | 401 | if ( mediaPlayerState->fullscreen() ) { |
401 | // Clear the background | 402 | // Clear the background |
402 | p.setBrush( QBrush( Qt::black ) ); | 403 | p.setBrush( QBrush( Qt::black ) ); |
403 | } else { | 404 | } else { |