-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index f59772e..8409e5c 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp @@ -94,18 +94,19 @@ VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye QString skinPath = "opieplayer2/skins/" + skin; backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); imgUp = QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); imgDn = QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); buttonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 ); buttonMask.fill( 0 ); - for ( int i = 0; i < 7; i++ ) { - Button &button = buttons[ i ]; + uint i = 0; + for ( ButtonVector::iterator it = buttons.begin(); it != buttons.end(); ++it, ++i ) { + Button &button = *it; QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png" ); button.mask = QBitmap( filename ); if ( !button.mask.isNull() ) { QImage imgMask = button.mask.convertToImage(); uchar **dest = buttonMask.jumpTable(); for ( int y = 0; y < imgUp.height(); y++ ) { @@ -170,18 +171,18 @@ void VideoWidget::resizeEvent( QResizeEvent * ) { upperLeftOfButtonMask.ry() = 0; else upperLeftOfButtonMask.ry() = 185;//(( Vh - imgUp->height() ) / 2) - 10; QPoint p = upperLeftOfButtonMask; QPixmap *pixUp = combineVImageWithBackground( imgUp, backgroundPixmap, p ); QPixmap *pixDn = combineVImageWithBackground( imgDn, backgroundPixmap, p ); - for ( int i = 0; i < 7; i++ ) { - Button &button = buttons[ i ]; + for ( ButtonVector::iterator it = buttons.begin(); it != buttons.end(); ++it ) { + Button &button = *it; if ( !button.mask.isNull() ) { button.pixUp = maskVPixToMask( *pixUp, button.mask ); button.pixDown = maskVPixToMask( *pixDn, button.mask ); } } delete pixUp; |