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 | |
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
-rw-r--r-- | core/applets/batteryapplet/battery.cpp | 10 | ||||
-rw-r--r-- | core/applets/clipboardapplet/clipboard.cpp | 10 | ||||
-rw-r--r-- | core/applets/irdaapplet/irda.cpp | 0 | ||||
-rw-r--r-- | core/applets/irdaapplet/irdaappletimpl.h | 2 | ||||
-rw-r--r-- | core/applets/rotateapplet/rotate.h | 2 | ||||
-rw-r--r-- | core/applets/volumeapplet/volume.cpp | 2 |
6 files changed, 20 insertions, 6 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 @@ -36,3 +36,6 @@ BatteryMeter::BatteryMeter( QWidget *parent ) startTimer( 10000 ); + + setFixedWidth( QMAX(AppLnk::smallIconSize()*3/4, 6) ); setFixedHeight( AppLnk::smallIconSize() ); + chargeTimer = new QTimer( this ); @@ -53,3 +56,3 @@ QSize BatteryMeter::sizeHint() const { - return QSize(10, height() ); + return QSize(QMAX(AppLnk::smallIconSize()*3/4, 6), height() ); } @@ -118,2 +121,3 @@ void BatteryMeter::paintEvent( QPaintEvent* ) { + qWarning("paint"); if ( style == 1 ) @@ -124,4 +128,4 @@ void BatteryMeter::paintEvent( QPaintEvent* ) 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; diff --git a/core/applets/clipboardapplet/clipboard.cpp b/core/applets/clipboardapplet/clipboard.cpp index 21b68e3..bb0db9b 100644 --- a/core/applets/clipboardapplet/clipboard.cpp +++ b/core/applets/clipboardapplet/clipboard.cpp @@ -39,3 +39,7 @@ ClipboardApplet::ClipboardApplet( QWidget *parent, const char *name ) : QWidget( setFixedHeight ( AppLnk::smallIconSize() ); - m_clipboardPixmap = QPixmap ( Resource::loadPixmap( "paste" ) ); + + QImage img = Resource::loadImage( "paste"); + img = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); + + m_clipboardPixmap.convertFromImage( img ); @@ -142,3 +146,5 @@ void ClipboardApplet::paintEvent ( QPaintEvent* ) QPainter p ( this ); - p. drawPixmap( 0, 1, m_clipboardPixmap ); + /* center the height but our pixmap is as big as the height ;)*/ + p. drawPixmap( 0, 0, + m_clipboardPixmap ); } diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp index 51c2ebf..f850424 100644 --- a/core/applets/irdaapplet/irda.cpp +++ b/core/applets/irdaapplet/irda.cpp diff --git a/core/applets/irdaapplet/irdaappletimpl.h b/core/applets/irdaapplet/irdaappletimpl.h index ef0c5a6..f9e855a 100644 --- a/core/applets/irdaapplet/irdaappletimpl.h +++ b/core/applets/irdaapplet/irdaappletimpl.h @@ -22,2 +22,4 @@ +#include <qwidget.h> + #include <qpe/taskbarappletinterface.h> diff --git a/core/applets/rotateapplet/rotate.h b/core/applets/rotateapplet/rotate.h index 5ac7768..de2a707 100644 --- a/core/applets/rotateapplet/rotate.h +++ b/core/applets/rotateapplet/rotate.h @@ -36,2 +36,4 @@ +#include <qobject.h> + class RotateApplet : public QObject, public MenuAppletInterface diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp index b129be3..38f827e 100644 --- a/core/applets/volumeapplet/volume.cpp +++ b/core/applets/volumeapplet/volume.cpp @@ -765,3 +765,3 @@ void VolumeApplet::paintEvent ( QPaintEvent * ) - p. drawPixmap ( 0, 1, *m_pixmap ); + p. drawPixmap ( (width()- m_pixmap->width())/2, QMAX( (height()-4-m_pixmap->height() )/2, 1), *m_pixmap ); p. setPen ( darkGray ); |