-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 2081b4f..8659971 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -196,49 +196,49 @@ QPixmap maskPixToMask( QPixmap pix, QBitmap mask ) { | |||
196 | QPixmap pixmap( pix ); | 196 | QPixmap pixmap( pix ); |
197 | pixmap.setMask( mask ); | 197 | pixmap.setMask( mask ); |
198 | return pixmap; | 198 | return pixmap; |
199 | } | 199 | } |
200 | 200 | ||
201 | }; | 201 | }; |
202 | 202 | ||
203 | void AudioWidget::resizeEvent( QResizeEvent * ) { | 203 | void AudioWidget::resizeEvent( QResizeEvent * ) { |
204 | int h = height(); | 204 | int h = height(); |
205 | int w = width(); | 205 | int w = width(); |
206 | 206 | ||
207 | songInfo.setGeometry( QRect( 2, 2, w - 4, 20 ) ); | 207 | songInfo.setGeometry( QRect( 2, 2, w - 4, 20 ) ); |
208 | slider.setFixedWidth( w - 110 ); | 208 | slider.setFixedWidth( w - 110 ); |
209 | slider.setGeometry( QRect( 15, h - 22, w - 90, 20 ) ); | 209 | slider.setGeometry( QRect( 15, h - 22, w - 90, 20 ) ); |
210 | slider.setBackgroundOrigin( QWidget::ParentOrigin ); | 210 | slider.setBackgroundOrigin( QWidget::ParentOrigin ); |
211 | time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) ); | 211 | time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) ); |
212 | 212 | ||
213 | upperLeftOfButtonMask.rx() = ( w - imgUp.width() ) / 2; | 213 | upperLeftOfButtonMask.rx() = ( w - imgUp.width() ) / 2; |
214 | upperLeftOfButtonMask.ry() = (( h - imgUp.height() ) / 2) - 10; | 214 | upperLeftOfButtonMask.ry() = (( h - imgUp.height() ) / 2) - 10; |
215 | QPoint p = upperLeftOfButtonMask; | 215 | QPoint p = upperLeftOfButtonMask; |
216 | 216 | ||
217 | QPixmap pixUp = combineImageWithBackground( imgUp, pixBg, p ); | 217 | QPixmap pixUp = combineImageWithBackground( imgUp, pixBg, p ); |
218 | QPixmap pixDn = combineImageWithBackground( imgDn, pixBg, p ); | 218 | QPixmap pixDn = combineImageWithBackground( imgDn, pixBg, p ); |
219 | 219 | ||
220 | for ( int i = 0; i < 10; i++ ) { | 220 | for ( uint i = 0; i < masks.size(); i++ ) { |
221 | if ( !masks[i].isNull() ) { | 221 | if ( !masks[i].isNull() ) { |
222 | buttonPixUp[i] = maskPixToMask( pixUp, masks[i] ); | 222 | buttonPixUp[i] = maskPixToMask( pixUp, masks[i] ); |
223 | buttonPixDown[i] = maskPixToMask( pixDn, masks[i] ); | 223 | buttonPixDown[i] = maskPixToMask( pixDn, masks[i] ); |
224 | } | 224 | } |
225 | } | 225 | } |
226 | } | 226 | } |
227 | 227 | ||
228 | void AudioWidget::sliderPressed() { | 228 | void AudioWidget::sliderPressed() { |
229 | audioSliderBeingMoved = TRUE; | 229 | audioSliderBeingMoved = TRUE; |
230 | } | 230 | } |
231 | 231 | ||
232 | 232 | ||
233 | void AudioWidget::sliderReleased() { | 233 | void AudioWidget::sliderReleased() { |
234 | audioSliderBeingMoved = FALSE; | 234 | audioSliderBeingMoved = FALSE; |
235 | if ( slider.width() == 0 ) | 235 | if ( slider.width() == 0 ) |
236 | return; | 236 | return; |
237 | long val = long((double)slider.value() * mediaPlayerState.length() / slider.width()); | 237 | long val = long((double)slider.value() * mediaPlayerState.length() / slider.width()); |
238 | mediaPlayerState.setPosition( val ); | 238 | mediaPlayerState.setPosition( val ); |
239 | } | 239 | } |
240 | 240 | ||
241 | void AudioWidget::setPosition( long i ) { | 241 | void AudioWidget::setPosition( long i ) { |
242 | // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<set position %d",i); | 242 | // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<set position %d",i); |
243 | updateSlider( i, mediaPlayerState.length() ); | 243 | updateSlider( i, mediaPlayerState.length() ); |
244 | } | 244 | } |