summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/batteryapplet/batterystatus.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/batteryapplet/batterystatus.cpp b/core/applets/batteryapplet/batterystatus.cpp
index fdd963c..a32a3a6 100644
--- a/core/applets/batteryapplet/batterystatus.cpp
+++ b/core/applets/batteryapplet/batterystatus.cpp
@@ -202,33 +202,33 @@ void BatteryStatus::paintEvent( QPaintEvent * ) {
202 darkc = c.dark(280); 202 darkc = c.dark(280);
203 lightc = c.light(145); 203 lightc = c.light(145);
204 } else if ( ps->acStatus() == PowerStatus::Online ) { 204 } else if ( ps->acStatus() == PowerStatus::Online ) {
205 c = green.dark(130); 205 c = green.dark(130);
206 darkc = c.dark(200); 206 darkc = c.dark(200);
207 lightc = c.light(220); 207 lightc = c.light(220);
208 } else { 208 } else {
209 c = red; 209 c = red;
210 darkc = c.dark(280); 210 darkc = c.dark(280);
211 lightc = c.light(140); 211 lightc = c.light(140);
212 } 212 }
213 if ( percent < 0 ) 213 if ( percent < 0 )
214 return; 214 return;
215 215
216 int rightEnd1 = screenWidth - 47; 216 int rightEnd1 = screenWidth - 47;
217 int rightEnd2 = screenWidth - 35; 217 int rightEnd2 = screenWidth - 35;
218 int percent2 = ( percent / 100 ) * rightEnd1 ; 218 int percent2 = ( percent / 100.0 ) * rightEnd1 ;
219 p.setPen( black ); 219 p.setPen( black );
220 qDrawShadePanel( &p, 9, 30, rightEnd1 , 39, colorGroup(), TRUE, 1, NULL); 220 qDrawShadePanel( &p, 9, 30, rightEnd1 , 39, colorGroup(), TRUE, 1, NULL);
221 qDrawShadePanel( &p, rightEnd2, 37, 12, 24, colorGroup(), TRUE, 1, NULL); 221 qDrawShadePanel( &p, rightEnd2, 37, 12, 24, colorGroup(), TRUE, 1, NULL);
222 drawSegment( &p, QRect( 10, 30, percent2, 40 ), lightc, darkc, lightc.light(115), 6 ); 222 drawSegment( &p, QRect( 10, 30, percent2, 40 ), lightc, darkc, lightc.light(115), 6 );
223 drawSegment( &p, QRect( 11 + percent2, 30, rightEnd1 - percent2, 40 ), white.light(80), black, white.light(90), 6 ); 223 drawSegment( &p, QRect( 11 + percent2, 30, rightEnd1 - percent2, 40 ), white.light(80), black, white.light(90), 6 );
224 drawSegment( &p, QRect( rightEnd2, 37, 10, 25 ), white.light(80), black, white.light(90), 2 ); 224 drawSegment( &p, QRect( rightEnd2, 37, 10, 25 ), white.light(80), black, white.light(90), 2 );
225 p.setPen( black); 225 p.setPen( black);
226 226
227 227
228 if ( ODevice::inst ( )-> series ( ) == Model_iPAQ ) { 228 if ( ODevice::inst ( )-> series ( ) == Model_iPAQ ) {
229 229
230 p.drawText(15, 50, tr ("Ipaq " + ipaqChem)); 230 p.drawText(15, 50, tr ("Ipaq " + ipaqChem));
231 231
232 QString jacketMsg; 232 QString jacketMsg;
233 if (bat2) { 233 if (bat2) {
234 p.setPen(black); 234 p.setPen(black);