author | zecke <zecke> | 2003-09-03 20:28:36 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-09-03 20:28:36 (UTC) |
commit | 2ec64be7f5250e851f44107552e89aff62922d44 (patch) (side-by-side diff) | |
tree | 8a6be2da822ca969710fca4d604c7fede6b88916 /core/applets/batteryapplet/battery.cpp | |
parent | adbbb67c7032080195970c78e43209b564a0295f (diff) | |
download | opie-2ec64be7f5250e851f44107552e89aff62922d44.zip opie-2ec64be7f5250e851f44107552e89aff62922d44.tar.gz opie-2ec64be7f5250e851f44107552e89aff62922d44.tar.bz2 |
Fix the most grave visible problems with bigger screen
resolutions
Diffstat (limited to 'core/applets/batteryapplet/battery.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/batteryapplet/battery.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp index 078ce8d..15eb762 100644 --- a/core/applets/batteryapplet/battery.cpp +++ b/core/applets/batteryapplet/battery.cpp @@ -33,9 +33,12 @@ BatteryMeter::BatteryMeter( QWidget *parent ) : QWidget( parent ), charging(false) { ps = new PowerStatus; startTimer( 10000 ); + + setFixedWidth( QMAX(AppLnk::smallIconSize()*3/4, 6) ); setFixedHeight( AppLnk::smallIconSize() ); + chargeTimer = new QTimer( this ); connect( chargeTimer, SIGNAL(timeout()), this, SLOT(chargeTimeout()) ); timerEvent(0); QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); @@ -50,9 +53,9 @@ BatteryMeter::~BatteryMeter() } QSize BatteryMeter::sizeHint() const { - return QSize(10, height() ); + return QSize(QMAX(AppLnk::smallIconSize()*3/4, 6), height() ); } void BatteryMeter::mousePressEvent( QMouseEvent* e ) { @@ -115,16 +118,17 @@ void BatteryMeter::chargeTimeout() } void BatteryMeter::paintEvent( QPaintEvent* ) { + qWarning("paint"); if ( style == 1 ) { QPainter p(this); QFont f( "Fixed", AppLnk::smallIconSize()/2 ); QFontMetrics fm( f ); p.setFont( f ); - p.drawText( 0, AppLnk::smallIconSize()/2, QString::number( percent ) ); - p.drawText( AppLnk::smallIconSize()/4, AppLnk::smallIconSize(), "%" ); + p.drawText( 0, height()/2, QString::number( percent ) ); + p.drawText( width()/4, height(), "%" ); return; } QPainter p(this); |