author | simon <simon> | 2002-12-09 16:01:03 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-09 16:01:03 (UTC) |
commit | d8aead05894e6a28b5aab45807ff2e6f27620f97 (patch) (unidiff) | |
tree | 25b03bab434e42d3f8a134441b468ae5108e712a | |
parent | f676d71c1fe40539ceb0c0708fdaefcc9b5e1800 (diff) | |
download | opie-d8aead05894e6a28b5aab45807ff2e6f27620f97.zip opie-d8aead05894e6a28b5aab45807ff2e6f27620f97.tar.gz opie-d8aead05894e6a28b5aab45807ff2e6f27620f97.tar.bz2 |
- less hardcoding of numbers
-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 | |||
@@ -99,8 +99,9 @@ VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye | |||
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 ); |
@@ -175,8 +176,8 @@ void VideoWidget::resizeEvent( QResizeEvent * ) { | |||
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 ); |