summaryrefslogtreecommitdiff
path: root/core/applets/batteryapplet/battery.cpp
Unidiff
Diffstat (limited to 'core/applets/batteryapplet/battery.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/batteryapplet/battery.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp
index 480d261..078ce8d 100644
--- a/core/applets/batteryapplet/battery.cpp
+++ b/core/applets/batteryapplet/battery.cpp
@@ -122,18 +122,8 @@ void BatteryMeter::paintEvent( QPaintEvent* )
122 QFont f( "Fixed", AppLnk::smallIconSize()/2 ); 122 QFont f( "Fixed", AppLnk::smallIconSize()/2 );
123 QFontMetrics fm( f ); 123 QFontMetrics fm( f );
124 p.setFont( f ); 124 p.setFont( f );
125 if ( percent > 98 ) { 125 p.drawText( 0, AppLnk::smallIconSize()/2, QString::number( percent ) );
126 p.drawText( 0, 0, width(), height(), Qt::AlignCenter, tr( "F" ) ); 126 p.drawText( AppLnk::smallIconSize()/4, AppLnk::smallIconSize(), "%" );
127 }
128 else if ( percent < 5 )
129 {
130 p.drawText( 0, 0, width(), height(), Qt::AlignCenter, tr( "E" ) );
131 }
132 else
133 {
134 p.drawText( 0, AppLnk::smallIconSize()/2, QString::number( percent ) );
135 p.drawText( AppLnk::smallIconSize()/4, AppLnk::smallIconSize(), "%" );
136 }
137 return; 127 return;
138 } 128 }
139 129