author | drw <drw> | 2004-02-18 16:23:17 (UTC) |
---|---|---|
committer | drw <drw> | 2004-02-18 16:23:17 (UTC) |
commit | 7d16774139aa40fb812d636bcf9ad3f45aa2b9e1 (patch) (side-by-side diff) | |
tree | 51dc00c15db884b4f4351ed685e022853446a0d6 /core/applets/batteryapplet/battery.cpp | |
parent | 45179e1807aa5ca024b423112303509f91253a53 (diff) | |
download | opie-7d16774139aa40fb812d636bcf9ad3f45aa2b9e1.zip opie-7d16774139aa40fb812d636bcf9ad3f45aa2b9e1.tar.gz opie-7d16774139aa40fb812d636bcf9ad3f45aa2b9e1.tar.bz2 |
Fix size and drawing of battery status widget and eliminate compiler warnings
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 @@ -70,7 +70,7 @@ void BatteryMeter::mousePressEvent( QMouseEvent* e ) QWidget::mousePressEvent( e ); } -void BatteryMeter::mouseReleaseEvent( QMouseEvent* e) +void BatteryMeter::mouseReleaseEvent( QMouseEvent* /*e*/ ) { if ( batteryView && batteryView->isVisible() ) { delete (QWidget *) batteryView; @@ -110,11 +110,11 @@ 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* ) @@ -154,7 +154,7 @@ void BatteryMeter::paintEvent( QPaintEvent* ) 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++ ) |