Diffstat (limited to 'core/applets/batteryapplet/battery.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/batteryapplet/battery.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp index 3b64fb5..9a9ddf6 100644 --- a/core/applets/batteryapplet/battery.cpp +++ b/core/applets/batteryapplet/battery.cpp @@ -67,13 +67,13 @@ void BatteryMeter::mousePressEvent( QMouseEvent* e ) c.writeEntry( "Style", style ); repaint( true ); } QWidget::mousePressEvent( e ); } -void BatteryMeter::mouseReleaseEvent( QMouseEvent* e) +void BatteryMeter::mouseReleaseEvent( QMouseEvent* /*e*/ ) { if ( batteryView && batteryView->isVisible() ) { delete (QWidget *) batteryView; } else { if ( !batteryView ) batteryView = new BatteryStatus( ps ); QPEApplication::showWidget( batteryView ); @@ -107,17 +107,17 @@ void BatteryMeter::timerEvent( QTimerEvent * ) } void BatteryMeter::chargeTimeout() { percent += 20; if ( percent > 100 ) - percent = 0; + percent = 0; repaint(FALSE); if ( batteryView ) - batteryView->updatePercent( percent ); + batteryView->updatePercent( percent ); } void BatteryMeter::paintEvent( QPaintEvent* ) { if ( style == 1 ) @@ -151,13 +151,13 @@ void BatteryMeter::paintEvent( QPaintEvent* ) p.setPen(QColor(80,80,80)); p.drawLine(x1+w/4,0,x1+w/4+w/2+1,0); // header p.drawRect(x1,1,w,height()-1); // corpus p.setBrush(color); - int extra = ((percent * h) % 100)/(100/4); + //int extra = ((percent * h) % 100)/(100/4); int middle = w/2; for ( int i = 0; i < middle; i++ ) { p.setPen( gray.dark( 100+i*20 ) ); p.drawLine( x1+middle-i, 2, x1+middle-i, y-1 ); |