Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index bb686f1..bb07882 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -127,35 +127,26 @@ QPixmap maskPixToMask( QPixmap pix, QBitmap mask ) { | |||
127 | pixmap.setMask( mask ); | 127 | pixmap.setMask( mask ); |
128 | return pixmap; | 128 | return pixmap; |
129 | } | 129 | } |
130 | 130 | ||
131 | }; | 131 | }; |
132 | 132 | ||
133 | void AudioWidget::resizeEvent( QResizeEvent * ) { | 133 | void AudioWidget::resizeEvent( QResizeEvent *e ) { |
134 | int h = height(); | 134 | int h = height(); |
135 | int w = width(); | 135 | int w = width(); |
136 | 136 | ||
137 | songInfo.setGeometry( QRect( 2, 2, w - 4, 20 ) ); | 137 | songInfo.setGeometry( QRect( 2, 2, w - 4, 20 ) ); |
138 | slider.setFixedWidth( w - 110 ); | 138 | slider.setFixedWidth( w - 110 ); |
139 | slider.setGeometry( QRect( 15, h - 22, w - 90, 20 ) ); | 139 | slider.setGeometry( QRect( 15, h - 22, w - 90, 20 ) ); |
140 | slider.setBackgroundOrigin( QWidget::ParentOrigin ); | 140 | slider.setBackgroundOrigin( QWidget::ParentOrigin ); |
141 | time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) ); | 141 | time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) ); |
142 | 142 | ||
143 | upperLeftOfButtonMask.rx() = ( w - buttonUpImage.width() ) / 2; | 143 | upperLeftOfButtonMask.rx() = ( w - buttonUpImage.width() ) / 2; |
144 | upperLeftOfButtonMask.ry() = (( h - buttonUpImage.height() ) / 2) - 10; | 144 | upperLeftOfButtonMask.ry() = (( h - buttonUpImage.height() ) / 2) - 10; |
145 | QPoint p = upperLeftOfButtonMask; | ||
146 | 145 | ||
147 | QPixmap pixUp = combineImageWithBackground( buttonUpImage, backgroundPixmap, p ); | 146 | MediaWidget::resizeEvent( e ); |
148 | QPixmap pixDn = combineImageWithBackground( buttonDownImage, backgroundPixmap, p ); | ||
149 | |||
150 | for ( uint i = 0; i < buttons.size(); i++ ) { | ||
151 | if ( !buttons[i].mask.isNull() ) { | ||
152 | buttons[i].pixUp = maskPixToMask( pixUp, buttons[i].mask ); | ||
153 | buttons[i].pixDown = maskPixToMask( pixDn, buttons[i].mask ); | ||
154 | } | ||
155 | } | ||
156 | } | 147 | } |
157 | 148 | ||
158 | void AudioWidget::sliderPressed() { | 149 | void AudioWidget::sliderPressed() { |
159 | audioSliderBeingMoved = TRUE; | 150 | audioSliderBeingMoved = TRUE; |
160 | } | 151 | } |
161 | 152 | ||