author | zecke <zecke> | 2003-09-03 20:28:36 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-09-03 20:28:36 (UTC) |
commit | 2ec64be7f5250e851f44107552e89aff62922d44 (patch) (unidiff) | |
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 | 14 | ||||
-rw-r--r-- | core/applets/irdaapplet/irda.cpp | 2 | ||||
-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, 23 insertions, 9 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 | |||
@@ -31,13 +31,16 @@ | |||
31 | 31 | ||
32 | BatteryMeter::BatteryMeter( QWidget *parent ) | 32 | BatteryMeter::BatteryMeter( QWidget *parent ) |
33 | : QWidget( parent ), charging(false) | 33 | : QWidget( parent ), charging(false) |
34 | { | 34 | { |
35 | ps = new PowerStatus; | 35 | ps = new PowerStatus; |
36 | startTimer( 10000 ); | 36 | startTimer( 10000 ); |
37 | |||
38 | setFixedWidth( QMAX(AppLnk::smallIconSize()*3/4, 6) ); | ||
37 | setFixedHeight( AppLnk::smallIconSize() ); | 39 | setFixedHeight( AppLnk::smallIconSize() ); |
40 | |||
38 | chargeTimer = new QTimer( this ); | 41 | chargeTimer = new QTimer( this ); |
39 | connect( chargeTimer, SIGNAL(timeout()), this, SLOT(chargeTimeout()) ); | 42 | connect( chargeTimer, SIGNAL(timeout()), this, SLOT(chargeTimeout()) ); |
40 | timerEvent(0); | 43 | timerEvent(0); |
41 | QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); | 44 | QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); |
42 | Config c( "qpe" ); | 45 | Config c( "qpe" ); |
43 | c.setGroup( "Battery" ); | 46 | c.setGroup( "Battery" ); |
@@ -48,13 +51,13 @@ BatteryMeter::~BatteryMeter() | |||
48 | { | 51 | { |
49 | delete ps; | 52 | delete ps; |
50 | } | 53 | } |
51 | 54 | ||
52 | QSize BatteryMeter::sizeHint() const | 55 | QSize BatteryMeter::sizeHint() const |
53 | { | 56 | { |
54 | return QSize(10, height() ); | 57 | return QSize(QMAX(AppLnk::smallIconSize()*3/4, 6), height() ); |
55 | } | 58 | } |
56 | 59 | ||
57 | void BatteryMeter::mousePressEvent( QMouseEvent* e ) | 60 | void BatteryMeter::mousePressEvent( QMouseEvent* e ) |
58 | { | 61 | { |
59 | if ( e->button() == RightButton ) | 62 | if ( e->button() == RightButton ) |
60 | { | 63 | { |
@@ -113,20 +116,21 @@ void BatteryMeter::chargeTimeout() | |||
113 | if ( batteryView ) | 116 | if ( batteryView ) |
114 | batteryView->updatePercent( percent ); | 117 | batteryView->updatePercent( percent ); |
115 | } | 118 | } |
116 | 119 | ||
117 | void BatteryMeter::paintEvent( QPaintEvent* ) | 120 | void BatteryMeter::paintEvent( QPaintEvent* ) |
118 | { | 121 | { |
122 | qWarning("paint"); | ||
119 | if ( style == 1 ) | 123 | if ( style == 1 ) |
120 | { | 124 | { |
121 | QPainter p(this); | 125 | QPainter p(this); |
122 | QFont f( "Fixed", AppLnk::smallIconSize()/2 ); | 126 | QFont f( "Fixed", AppLnk::smallIconSize()/2 ); |
123 | QFontMetrics fm( f ); | 127 | QFontMetrics fm( f ); |
124 | p.setFont( f ); | 128 | p.setFont( f ); |
125 | p.drawText( 0, AppLnk::smallIconSize()/2, QString::number( percent ) ); | 129 | p.drawText( 0, height()/2, QString::number( percent ) ); |
126 | p.drawText( AppLnk::smallIconSize()/4, AppLnk::smallIconSize(), "%" ); | 130 | p.drawText( width()/4, height(), "%" ); |
127 | return; | 131 | return; |
128 | } | 132 | } |
129 | 133 | ||
130 | QPainter p(this); | 134 | QPainter p(this); |
131 | QColor color; | 135 | QColor color; |
132 | QColor g = gray.light( 160 ); | 136 | QColor g = gray.light( 160 ); |
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 | |||
@@ -32,15 +32,19 @@ | |||
32 | 32 | ||
33 | //=========================================================================== | 33 | //=========================================================================== |
34 | 34 | ||
35 | 35 | ||
36 | ClipboardApplet::ClipboardApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) | 36 | ClipboardApplet::ClipboardApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) |
37 | { | 37 | { |
38 | setFixedWidth ( AppLnk::smallIconSize() ); | 38 | setFixedWidth ( AppLnk::smallIconSize() ); |
39 | setFixedHeight ( AppLnk::smallIconSize() ); | 39 | setFixedHeight ( AppLnk::smallIconSize() ); |
40 | m_clipboardPixmap = QPixmap ( Resource::loadPixmap( "paste" ) ); | 40 | |
41 | QImage img = Resource::loadImage( "paste"); | ||
42 | img = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); | ||
43 | |||
44 | m_clipboardPixmap.convertFromImage( img ); | ||
41 | 45 | ||
42 | m_timer = new QTimer ( this ); | 46 | m_timer = new QTimer ( this ); |
43 | 47 | ||
44 | connect ( QApplication::clipboard ( ), SIGNAL( dataChanged ( )), this, SLOT( newData ( ))); | 48 | connect ( QApplication::clipboard ( ), SIGNAL( dataChanged ( )), this, SLOT( newData ( ))); |
45 | connect ( m_timer, SIGNAL( timeout ( )), this, SLOT( newData ( ))); | 49 | connect ( m_timer, SIGNAL( timeout ( )), this, SLOT( newData ( ))); |
46 | connect ( qApp, SIGNAL( aboutToQuit ( )), this, SLOT( shutdown ( ))); | 50 | connect ( qApp, SIGNAL( aboutToQuit ( )), this, SLOT( shutdown ( ))); |
@@ -137,13 +141,15 @@ void ClipboardApplet::action(int id) | |||
137 | } | 141 | } |
138 | } | 142 | } |
139 | 143 | ||
140 | void ClipboardApplet::paintEvent ( QPaintEvent* ) | 144 | void ClipboardApplet::paintEvent ( QPaintEvent* ) |
141 | { | 145 | { |
142 | QPainter p ( this ); | 146 | QPainter p ( this ); |
143 | p. drawPixmap( 0, 1, m_clipboardPixmap ); | 147 | /* center the height but our pixmap is as big as the height ;)*/ |
148 | p. drawPixmap( 0, 0, | ||
149 | m_clipboardPixmap ); | ||
144 | } | 150 | } |
145 | 151 | ||
146 | void ClipboardApplet::newData ( ) | 152 | void ClipboardApplet::newData ( ) |
147 | { | 153 | { |
148 | static bool excllock = false; | 154 | static bool excllock = false; |
149 | 155 | ||
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 | |||
@@ -312,13 +312,13 @@ void IrdaApplet::paintEvent ( QPaintEvent * ) | |||
312 | { | 312 | { |
313 | QPainter p ( this ); | 313 | QPainter p ( this ); |
314 | 314 | ||
315 | p. drawPixmap ( 0, 1, m_irda_active ? m_irdaOnPixmap : m_irdaOffPixmap ); | 315 | p. drawPixmap ( 0, 1, m_irda_active ? m_irdaOnPixmap : m_irdaOffPixmap ); |
316 | 316 | ||
317 | if ( m_irda_discovery_active ) | 317 | if ( m_irda_discovery_active ) |
318 | p. drawPixmap( 0, 1, m_irdaDiscoveryOnPixmap ); | 318 | p. drawPixmap( 0, 1, m_irdaDiscoveryOnPixmap ); |
319 | 319 | ||
320 | if ( m_receive_active ) | 320 | if ( m_receive_active ) |
321 | p. drawPixmap( 0, 1, m_receiveActivePixmap ); | 321 | p. drawPixmap( 0, 1, m_receiveActivePixmap ); |
322 | } | 322 | } |
323 | /* | 323 | /* |
324 | * We know 3 calls | 324 | * We know 3 calls |
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 | |||
@@ -17,12 +17,14 @@ | |||
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef IRDAAPPLETIMPL_H | 20 | #ifndef IRDAAPPLETIMPL_H |
21 | #define IRDAAPPLETIMPL_H | 21 | #define IRDAAPPLETIMPL_H |
22 | 22 | ||
23 | #include <qwidget.h> | ||
24 | |||
23 | #include <qpe/taskbarappletinterface.h> | 25 | #include <qpe/taskbarappletinterface.h> |
24 | 26 | ||
25 | class IrdaApplet; | 27 | class IrdaApplet; |
26 | 28 | ||
27 | class IrdaAppletImpl : public TaskbarAppletInterface | 29 | class IrdaAppletImpl : public TaskbarAppletInterface |
28 | { | 30 | { |
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 | |||
@@ -31,12 +31,14 @@ | |||
31 | #ifndef __OPIE_ROTATE_APPLET_H__ | 31 | #ifndef __OPIE_ROTATE_APPLET_H__ |
32 | #define __OPIE_ROTATE_APPLET_H__ | 32 | #define __OPIE_ROTATE_APPLET_H__ |
33 | 33 | ||
34 | #include <qpe/menuappletinterface.h> | 34 | #include <qpe/menuappletinterface.h> |
35 | #include <qobject.h> | 35 | #include <qobject.h> |
36 | 36 | ||
37 | #include <qobject.h> | ||
38 | |||
37 | class RotateApplet : public QObject, public MenuAppletInterface | 39 | class RotateApplet : public QObject, public MenuAppletInterface |
38 | { | 40 | { |
39 | 41 | ||
40 | Q_OBJECT | 42 | Q_OBJECT |
41 | 43 | ||
42 | public: | 44 | public: |
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 | |||
@@ -760,13 +760,13 @@ void VolumeApplet::redraw ( bool all ) | |||
760 | 760 | ||
761 | 761 | ||
762 | void VolumeApplet::paintEvent ( QPaintEvent * ) | 762 | void VolumeApplet::paintEvent ( QPaintEvent * ) |
763 | { | 763 | { |
764 | QPainter p ( this ); | 764 | QPainter p ( this ); |
765 | 765 | ||
766 | p. drawPixmap ( 0, 1, *m_pixmap ); | 766 | p. drawPixmap ( (width()- m_pixmap->width())/2, QMAX( (height()-4-m_pixmap->height() )/2, 1), *m_pixmap ); |
767 | p. setPen ( darkGray ); | 767 | p. setPen ( darkGray ); |
768 | p. drawRect ( 1, height() - 4, width() - 2, 4 ); | 768 | p. drawRect ( 1, height() - 4, width() - 2, 4 ); |
769 | 769 | ||
770 | int pixelsWide = m_dialog-> volPercent ( ) * ( width() - 4 ) / 100; | 770 | int pixelsWide = m_dialog-> volPercent ( ) * ( width() - 4 ) / 100; |
771 | p. fillRect ( 2, height() - 3, pixelsWide, 2, red ); | 771 | p. fillRect ( 2, height() - 3, pixelsWide, 2, red ); |
772 | p. fillRect ( pixelsWide + 2, height() - 3, width() - 4 - pixelsWide, 2, lightGray ); | 772 | p. fillRect ( pixelsWide + 2, height() - 3, width() - 4 - pixelsWide, 2, lightGray ); |