-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 22afe19..8dadf96 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -152,65 +152,65 @@ void MediaPlayer::startIncreasingVolume() { | |||
152 | bool drawnOnScreenDisplay = FALSE; | 152 | bool drawnOnScreenDisplay = FALSE; |
153 | unsigned int onScreenDisplayVolume = 0; | 153 | unsigned int onScreenDisplayVolume = 0; |
154 | const int yoff = 110; | 154 | const int yoff = 110; |
155 | 155 | ||
156 | void MediaPlayer::stopChangingVolume() { | 156 | void MediaPlayer::stopChangingVolume() { |
157 | killTimers(); | 157 | killTimers(); |
158 | // Get rid of the on-screen display stuff | 158 | // Get rid of the on-screen display stuff |
159 | drawnOnScreenDisplay = FALSE; | 159 | drawnOnScreenDisplay = FALSE; |
160 | onScreenDisplayVolume = 0; | 160 | onScreenDisplayVolume = 0; |
161 | int w=0; | 161 | int w=0; |
162 | int h=0; | 162 | int h=0; |
163 | if( !xineControl->hasVideo()) { | 163 | if( !xineControl->hasVideo()) { |
164 | w = audioUI->width(); | 164 | w = audioUI->width(); |
165 | h = audioUI->height(); | 165 | h = audioUI->height(); |
166 | audioUI->repaint( (w - 200) / 2, h - yoff, 200 + 9, 70, FALSE ); | 166 | audioUI->repaint( (w - 200) / 2, h - yoff, 200 + 9, 70, FALSE ); |
167 | } else { | 167 | } else { |
168 | w = videoUI->width(); | 168 | w = videoUI->width(); |
169 | h = videoUI->height(); | 169 | h = videoUI->height(); |
170 | videoUI->repaint( (w - 200) / 2, h - yoff, 200 + 9, 70, FALSE ); | 170 | videoUI->repaint( (w - 200) / 2, h - yoff, 200 + 9, 70, FALSE ); |
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
174 | 174 | ||
175 | void MediaPlayer::timerEvent( QTimerEvent * ) { | 175 | void MediaPlayer::timerEvent( QTimerEvent * ) { |
176 | if ( volumeDirection == +1 ) { | 176 | if ( volumeDirection == +1 ) { |
177 | volControl->incVol(2); | 177 | volControl->incVol(2); |
178 | } else if ( volumeDirection == -1 ) { | 178 | } else if ( volumeDirection == -1 ) { |
179 | volControl->decVol(2); | 179 | volControl->decVol(2); |
180 | } | 180 | } |
181 | 181 | ||
182 | 182 | ||
183 | // TODO FIXME | 183 | // TODO FIXME |
184 | int v; | 184 | unsigned int v; |
185 | v = volControl->getVolume(); | 185 | v = volControl->getVolume(); |
186 | v = v / 10; | 186 | v = v / 10; |
187 | 187 | ||
188 | if ( drawnOnScreenDisplay && onScreenDisplayVolume == v ) { | 188 | if ( drawnOnScreenDisplay && onScreenDisplayVolume == v ) { |
189 | return; | 189 | return; |
190 | } | 190 | } |
191 | 191 | ||
192 | int w=0; int h=0; | 192 | int w=0; int h=0; |
193 | if( !xineControl->hasVideo()) { | 193 | if( !xineControl->hasVideo()) { |
194 | w = audioUI->width(); | 194 | w = audioUI->width(); |
195 | h = audioUI->height(); | 195 | h = audioUI->height(); |
196 | 196 | ||
197 | if ( drawnOnScreenDisplay ) { | 197 | if ( drawnOnScreenDisplay ) { |
198 | if ( onScreenDisplayVolume > v ) { | 198 | if ( onScreenDisplayVolume > v ) { |
199 | audioUI->repaint( (w - 200) / 2 + v * 20 + 0, h - yoff + 40, (onScreenDisplayVolume - v) * 20 + 9, 30, FALSE ); | 199 | audioUI->repaint( (w - 200) / 2 + v * 20 + 0, h - yoff + 40, (onScreenDisplayVolume - v) * 20 + 9, 30, FALSE ); |
200 | } | 200 | } |
201 | } | 201 | } |
202 | drawnOnScreenDisplay = TRUE; | 202 | drawnOnScreenDisplay = TRUE; |
203 | onScreenDisplayVolume = v; | 203 | onScreenDisplayVolume = v; |
204 | QPainter p( audioUI ); | 204 | QPainter p( audioUI ); |
205 | p.setPen( QColor( 0x10, 0xD0, 0x10 ) ); | 205 | p.setPen( QColor( 0x10, 0xD0, 0x10 ) ); |
206 | p.setBrush( QColor( 0x10, 0xD0, 0x10 ) ); | 206 | p.setBrush( QColor( 0x10, 0xD0, 0x10 ) ); |
207 | 207 | ||
208 | QFont f; | 208 | QFont f; |
209 | f.setPixelSize( 20 ); | 209 | f.setPixelSize( 20 ); |
210 | f.setBold( TRUE ); | 210 | f.setBold( TRUE ); |
211 | p.setFont( f ); | 211 | p.setFont( f ); |
212 | p.drawText( (w - 200) / 2, h - yoff + 20, tr("Volume") ); | 212 | p.drawText( (w - 200) / 2, h - yoff + 20, tr("Volume") ); |
213 | 213 | ||
214 | for ( unsigned int i = 0; i < 10; i++ ) { | 214 | for ( unsigned int i = 0; i < 10; i++ ) { |
215 | if ( v > i ) { | 215 | if ( v > i ) { |
216 | p.drawRect( (w - 200) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 ); | 216 | p.drawRect( (w - 200) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 ); |