summaryrefslogtreecommitdiff
path: root/core/applets/batteryapplet/battery.cpp
authorskyhusker <skyhusker>2005-06-14 18:14:38 (UTC)
committer skyhusker <skyhusker>2005-06-14 18:14:38 (UTC)
commitcc964541dce909aa557b7f07d00b63c4578a00ee (patch) (side-by-side diff)
tree2f3497aaad3903111894d662a7395a278b5a8c35 /core/applets/batteryapplet/battery.cpp
parentce379c1225ee98d58b98a0b9f2c133ac690e75ff (diff)
downloadopie-cc964541dce909aa557b7f07d00b63c4578a00ee.zip
opie-cc964541dce909aa557b7f07d00b63c4578a00ee.tar.gz
opie-cc964541dce909aa557b7f07d00b63c4578a00ee.tar.bz2
Fix bugs #1384 and #1546
Diffstat (limited to 'core/applets/batteryapplet/battery.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/batteryapplet/battery.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp
index e85a9da..fa95b2b 100644
--- a/core/applets/batteryapplet/battery.cpp
+++ b/core/applets/batteryapplet/battery.cpp
@@ -123,24 +123,26 @@ void BatteryMeter::chargeTimeout() {
repaint(FALSE);
if ( batteryView )
batteryView->updatePercent( percent );
}
void BatteryMeter::paintEvent( QPaintEvent* ) {
if ( style == 1 ) {
QPainter p(this);
QFont f( "Fixed", AppLnk::smallIconSize()/2 );
QFontMetrics fm( f );
+ //Avoid text overlapping
+ p.eraseRect( 0, 0, 20, 20 );
p.setFont( f );
p.drawText( 0, height()/2, QString::number( percent ) );
p.drawText( width()/4, height(), "%" );
return;
}
QPainter p(this);
QColor color;
QColor g = gray.light( 160 );
switch ( ps->acStatus() ) {
case PowerStatus::Offline:
color = blue.light( 150 );