-rw-r--r-- | core/applets/batteryapplet/battery.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp index eee3ed3..078ce8d 100644 --- a/core/applets/batteryapplet/battery.cpp +++ b/core/applets/batteryapplet/battery.cpp @@ -57,17 +57,17 @@ QSize BatteryMeter::sizeHint() const void BatteryMeter::mousePressEvent( QMouseEvent* e ) { if ( e->button() == RightButton ) { style = 1-style; Config c( "qpe" ); c.setGroup( "Battery" ); c.writeEntry( "Style", style ); - repaint(); + repaint( true ); } QWidget::mousePressEvent( e ); } void BatteryMeter::mouseReleaseEvent( QMouseEvent* e) { if ( batteryView && batteryView->isVisible() ) { delete (QWidget *) batteryView; @@ -92,17 +92,17 @@ void BatteryMeter::timerEvent( QTimerEvent * ) charging = true; chargeTimer->start( 500 ); } else if ( charging && ps->batteryStatus() != PowerStatus::Charging ) { charging = false; chargeTimer->stop(); if ( batteryView ) batteryView->updatePercent( percent ); } - repaint(FALSE); + repaint( style != 0 ); if ( batteryView ) batteryView->repaint(); } } void BatteryMeter::chargeTimeout() { percent += 20; |