summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/applets/networkapplet/networkapplet.cpp20
-rw-r--r--noncore/applets/networkapplet/networkapplet.h2
2 files changed, 16 insertions, 6 deletions
diff --git a/noncore/applets/networkapplet/networkapplet.cpp b/noncore/applets/networkapplet/networkapplet.cpp
index 4e658da..9a08568 100644
--- a/noncore/applets/networkapplet/networkapplet.cpp
+++ b/noncore/applets/networkapplet/networkapplet.cpp
@@ -29,20 +29,25 @@
*/
#include "networkapplet.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
+#include <opie2/onetwork.h>
#include <opie2/otaskbarapplet.h>
+#include <qpe/applnk.h>
#include <qpe/qlibrary.h>
#include <qpe/resource.h>
#include <qpainter.h>
-#include <opie2/odebug.h>
-#include <opie2/onetwork.h>
-#include <qpushbutton.h>
+/* QT */
+#include <qhostaddress.h>
+#include <qimage.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
-#include <qtoolbutton.h>
-#include <qhostaddress.h>
#include <qobjectlist.h>
+#include <qpushbutton.h>
+#include <qtoolbutton.h>
#include <assert.h>
@@ -210,6 +215,9 @@ QSize NetworkAppletControl::sizeHint() const
NetworkApplet::NetworkApplet( QWidget *parent, const char *name )
:OTaskbarApplet( parent, name )
{
+ setFixedHeight( AppLnk::smallIconSize() );
+ setFixedWidth( AppLnk::smallIconSize() );
+ _pixmap.convertFromImage( Resource::loadImage( "networkapplet/network" ).smoothScale( height(), width() ) );
_control = new NetworkAppletControl( this, "control" );
}
@@ -228,7 +236,7 @@ int NetworkApplet::position()
void NetworkApplet::paintEvent( QPaintEvent* )
{
QPainter p(this);
- p.drawPixmap(0, 2, Resource::loadPixmap( "networkapplet/network" ) );
+ p.drawPixmap(0, 2, _pixmap );
}
diff --git a/noncore/applets/networkapplet/networkapplet.h b/noncore/applets/networkapplet/networkapplet.h
index 7b5fa97..8022537 100644
--- a/noncore/applets/networkapplet/networkapplet.h
+++ b/noncore/applets/networkapplet/networkapplet.h
@@ -36,6 +36,7 @@
#include <qstring.h>
#include <qtoolbutton.h>
#include <qlineedit.h>
+#include <qpixmap.h>
class ONetworkInterface;
class QShowEvent;
@@ -106,6 +107,7 @@ class NetworkApplet : public OTaskbarApplet
private:
NetworkAppletControl* _control;
+ QPixmap _pixmap;
};
#endif