Diffstat (limited to 'core/applets/batteryapplet/battery.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/applets/batteryapplet/battery.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp index 3b329c6..f3a95ed 100644 --- a/core/applets/batteryapplet/battery.cpp +++ b/core/applets/batteryapplet/battery.cpp | |||
@@ -21,6 +21,7 @@ | |||
21 | #include "batterystatus.h" | 21 | #include "batterystatus.h" |
22 | 22 | ||
23 | #include <qpe/power.h> | 23 | #include <qpe/power.h> |
24 | #include <qpe/applnk.h> | ||
24 | 25 | ||
25 | #include <qpainter.h> | 26 | #include <qpainter.h> |
26 | #include <qtimer.h> | 27 | #include <qtimer.h> |
@@ -31,7 +32,7 @@ BatteryMeter::BatteryMeter( QWidget *parent ) | |||
31 | { | 32 | { |
32 | ps = new PowerStatus; | 33 | ps = new PowerStatus; |
33 | startTimer( 10000 ); | 34 | startTimer( 10000 ); |
34 | setFixedHeight(12); | 35 | setFixedHeight( AppLnk::smallIconSize() ); |
35 | chargeTimer = new QTimer( this ); | 36 | chargeTimer = new QTimer( this ); |
36 | connect( chargeTimer, SIGNAL(timeout()), this, SLOT(chargeTimeout()) ); | 37 | connect( chargeTimer, SIGNAL(timeout()), this, SLOT(chargeTimeout()) ); |
37 | timerEvent(0); | 38 | timerEvent(0); |
@@ -44,7 +45,7 @@ BatteryMeter::~BatteryMeter() | |||
44 | 45 | ||
45 | QSize BatteryMeter::sizeHint() const | 46 | QSize BatteryMeter::sizeHint() const |
46 | { | 47 | { |
47 | return QSize(10,12); | 48 | return QSize(10, height() ); |
48 | } | 49 | } |
49 | 50 | ||
50 | void BatteryMeter::mouseReleaseEvent( QMouseEvent *) | 51 | void BatteryMeter::mouseReleaseEvent( QMouseEvent *) |
@@ -116,8 +117,8 @@ void BatteryMeter::paintEvent( QPaintEvent* ) | |||
116 | lightc = c.light(160); | 117 | lightc = c.light(160); |
117 | } | 118 | } |
118 | 119 | ||
119 | int w = 6; | 120 | int w = height() / 2 ; |
120 | int h = height()-3; | 121 | int h = height() - 4; |
121 | int pix = (percent * h) / 100; | 122 | int pix = (percent * h) / 100; |
122 | int y2 = height() - 2; | 123 | int y2 = height() - 2; |
123 | int y = y2 - pix; | 124 | int y = y2 - pix; |