summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-14 17:30:26 (UTC)
committer simon <simon>2002-12-14 17:30:26 (UTC)
commita3b9d0a1e6ee4f1e74ac3335cb2ba67f6da30476 (patch) (side-by-side diff)
treedde78606067af08f0e3ac8f6ccabff2661b99d08
parentbbdeff25bd0cc5ff59d52fd8bf25cdfbeac8f251 (diff)
downloadopie-a3b9d0a1e6ee4f1e74ac3335cb2ba67f6da30476.zip
opie-a3b9d0a1e6ee4f1e74ac3335cb2ba67f6da30476.tar.gz
opie-a3b9d0a1e6ee4f1e74ac3335cb2ba67f6da30476.tar.bz2
- kill the flickery when painting. backgroundmode is now always
NoBackground and we do full double-buffering in the paintEvent
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp22
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp4
3 files changed, 8 insertions, 20 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index cd5bea4..5d929cb 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -173,4 +173,2 @@ void AudioWidget::loadSkin()
- setBackgroundPixmap( backgroundPixmap );
-
songInfo.setFocusPolicy( QWidget::NoFocus );
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index 702e6d7..f7a22a3 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -35,2 +35,4 @@ MediaWidget::MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPla
this, SLOT( setPlaying( bool ) ) );
+
+ setBackgroundMode( NoBackground );
}
@@ -93,17 +95,9 @@ void MediaWidget::paintEvent( QPaintEvent *pe )
return;
- }
-
- if ( !pe->erased() ) {
- // Combine with background and double buffer
- QPixmap pix( pe->rect().size() );
- QPainter p( &pix );
- p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() );
- p.drawTiledPixmap( pe->rect(), backgroundPixmap, pe->rect().topLeft() );
- paintAllButtons( p );
- QPainter p2( this );
- p2.drawPixmap( pe->rect().topLeft(), pix );
- } else {
- QPainter p( this );
- paintAllButtons( p );
}
+
+ QPixmap buffer( size() );
+ QPainter bufferedPainter( &buffer );
+ bufferedPainter.drawTiledPixmap( rect(), backgroundPixmap, QPoint( 0, 0 ) );
+ paintAllButtons( bufferedPainter );
+ p.drawPixmap( 0, 0, buffer );
}
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 2300630..755cd22 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -166,4 +166,2 @@ void VideoWidget::loadSkin()
- setBackgroundPixmap( backgroundPixmap );
-
delete slider;
@@ -211,3 +209,2 @@ void VideoWidget::makeVisible() {
if ( mediaPlayerState.isFullscreen() ) {
- setBackgroundMode( QWidget::NoBackground );
showFullScreen();
@@ -225,3 +222,2 @@ void VideoWidget::makeVisible() {
showMaximized();
- setBackgroundPixmap( backgroundPixmap );
QWidget *d = QApplication::desktop();