author | simon <simon> | 2002-12-09 15:15:23 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-09 15:15:23 (UTC) |
commit | 3f37a852175ace7ee69b626f48eaea19d736b6ed (patch) (side-by-side diff) | |
tree | 5b35af63926143660dc634d27b9b230cc13aca7c /noncore/multimedia/opieplayer2/audiowidget.cpp | |
parent | 80902b6ade54252e05cf948040a11b2e975f6759 (diff) | |
download | opie-3f37a852175ace7ee69b626f48eaea19d736b6ed.zip opie-3f37a852175ace7ee69b626f48eaea19d736b6ed.tar.gz opie-3f37a852175ace7ee69b626f48eaea19d736b6ed.tar.bz2 |
- pixBg is now backgroundPixmap and shared in the base class
Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 5cc2814..553c56b 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -92,13 +92,13 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye cfg.setGroup("Options"); skin = cfg.readEntry("Skin","default"); //skin = "scaleTest"; // color of background, frame, degree of transparency QString skinPath = "opieplayer2/skins/" + skin; - pixBg = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); + backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); imgUp = QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); imgDn = QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); buttonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 ); buttonMask.fill( 0 ); @@ -120,26 +120,26 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye } } buttons.insert( i, button ); } - setBackgroundPixmap( pixBg ); + setBackgroundPixmap( backgroundPixmap ); songInfo.setFocusPolicy( QWidget::NoFocus ); // changeTextColor( &songInfo ); // songInfo.setBackgroundColor( QColor( 167, 212, 167 )); // songInfo.setFrameStyle( QFrame::NoFrame); songInfo.setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); // songInfo.setForegroundColor(Qt::white); slider.setFixedHeight( 20 ); slider.setMinValue( 0 ); slider.setMaxValue( 1 ); slider.setFocusPolicy( QWidget::NoFocus ); - slider.setBackgroundPixmap( pixBg ); + slider.setBackgroundPixmap( backgroundPixmap ); // Config cofg("qpe"); // cofg.setGroup("Appearance"); // QColor backgroundcolor = QColor( cofg.readEntry( "Background", "#E5E1D5" ) ); time.setFocusPolicy( QWidget::NoFocus ); @@ -202,14 +202,14 @@ void AudioWidget::resizeEvent( QResizeEvent * ) { time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) ); upperLeftOfButtonMask.rx() = ( w - imgUp.width() ) / 2; upperLeftOfButtonMask.ry() = (( h - imgUp.height() ) / 2) - 10; QPoint p = upperLeftOfButtonMask; - QPixmap pixUp = combineImageWithBackground( imgUp, pixBg, p ); - QPixmap pixDn = combineImageWithBackground( imgDn, pixBg, p ); + QPixmap pixUp = combineImageWithBackground( imgUp, backgroundPixmap, p ); + QPixmap pixDn = combineImageWithBackground( imgDn, backgroundPixmap, p ); for ( uint i = 0; i < buttons.count(); i++ ) { if ( !buttons[i].mask.isNull() ) { buttons[i].pixUp = maskPixToMask( pixUp, buttons[i].mask ); buttons[i].pixDown = maskPixToMask( pixDn, buttons[i].mask ); } @@ -401,13 +401,13 @@ void AudioWidget::showEvent( QShowEvent* ) { void AudioWidget::paintEvent( QPaintEvent * pe ) { 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(), pixBg, pe->rect().topLeft() ); + p.drawTiledPixmap( pe->rect(), backgroundPixmap, pe->rect().topLeft() ); for ( unsigned int i = 0; i < buttons.count(); i++ ) paintButton( p, buttons[ i ] ); QPainter p2( this ); p2.drawPixmap( pe->rect().topLeft(), pix ); } else { QPainter p( this ); |