summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp9
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
94 QString skinPath = "opieplayer2/skins/" + skin; 94 QString skinPath = "opieplayer2/skins/" + skin;
95 backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); 95 backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
96 imgUp = QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); 96 imgUp = QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) );
97 imgDn = QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); 97 imgDn = QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) );
98 98
99 buttonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 ); 99 buttonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 );
100 buttonMask.fill( 0 ); 100 buttonMask.fill( 0 );
101 101
102 for ( int i = 0; i < 7; i++ ) { 102 uint i = 0;
103 Button &button = buttons[ i ]; 103 for ( ButtonVector::iterator it = buttons.begin(); it != buttons.end(); ++it, ++i ) {
104 Button &button = *it;
104 105
105 QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png" ); 106 QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png" );
106 button.mask = QBitmap( filename ); 107 button.mask = QBitmap( filename );
107 108
108 if ( !button.mask.isNull() ) { 109 if ( !button.mask.isNull() ) {
109 QImage imgMask = button.mask.convertToImage(); 110 QImage imgMask = button.mask.convertToImage();
110 uchar **dest = buttonMask.jumpTable(); 111 uchar **dest = buttonMask.jumpTable();
111 for ( int y = 0; y < imgUp.height(); y++ ) { 112 for ( int y = 0; y < imgUp.height(); y++ ) {
@@ -170,18 +171,18 @@ void VideoWidget::resizeEvent( QResizeEvent * ) {
170 upperLeftOfButtonMask.ry() = 0; 171 upperLeftOfButtonMask.ry() = 0;
171 else 172 else
172 upperLeftOfButtonMask.ry() = 185;//(( Vh - imgUp->height() ) / 2) - 10; 173 upperLeftOfButtonMask.ry() = 185;//(( Vh - imgUp->height() ) / 2) - 10;
173 QPoint p = upperLeftOfButtonMask; 174 QPoint p = upperLeftOfButtonMask;
174 175
175 QPixmap *pixUp = combineVImageWithBackground( imgUp, backgroundPixmap, p ); 176 QPixmap *pixUp = combineVImageWithBackground( imgUp, backgroundPixmap, p );
176 QPixmap *pixDn = combineVImageWithBackground( imgDn, backgroundPixmap, p ); 177 QPixmap *pixDn = combineVImageWithBackground( imgDn, backgroundPixmap, p );
177 178
178 for ( int i = 0; i < 7; i++ ) { 179 for ( ButtonVector::iterator it = buttons.begin(); it != buttons.end(); ++it ) {
179 Button &button = buttons[ i ]; 180 Button &button = *it;
180 181
181 if ( !button.mask.isNull() ) { 182 if ( !button.mask.isNull() ) {
182 button.pixUp = maskVPixToMask( *pixUp, button.mask ); 183 button.pixUp = maskVPixToMask( *pixUp, button.mask );
183 button.pixDown = maskVPixToMask( *pixDn, button.mask ); 184 button.pixDown = maskVPixToMask( *pixDn, button.mask );
184 } 185 }
185 } 186 }
186 187
187 delete pixUp; 188 delete pixUp;