-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | core/applets/irdaapplet/irda.cpp | 25 |
2 files changed, 14 insertions, 12 deletions
@@ -32,8 +32,9 @@ * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) * n.a. - Build system: Fix deps in several config.in (and fix scripts/deps.pl too) to stop breaking builds, especially with make -j highNumber (clem) + * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) 2004-09-17 Opie 1.1.6 New Features diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp index 267714e..6148308 100644 --- a/core/applets/irdaapplet/irda.cpp +++ b/core/applets/irdaapplet/irda.cpp @@ -17,10 +17,12 @@ #include "irda.h" /* OPIE */ #include <opie2/otaskbarapplet.h> +#include <qpe/applnk.h> #include <qpe/resource.h> #include <qpe/qcopenvelope_qws.h> +using namespace Opie::Ui; /* QT */ #include <qpainter.h> #include <qfile.h> @@ -36,21 +38,20 @@ #include <sys/ioctl.h> //=========================================================================== -using namespace Opie::Ui; IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) : QWidget ( parent, name ) { - setFixedHeight ( 18 ); - setFixedWidth ( 14 ); + setFixedHeight( AppLnk::smallIconSize() ); + setFixedWidth( AppLnk::smallIconSize() ); - m_sockfd = ::socket ( PF_INET, SOCK_DGRAM, IPPROTO_IP ); + m_sockfd = ::socket ( PF_INET, SOCK_DGRAM, IPPROTO_IP ); - m_irdaOnPixmap = Resource::loadPixmap( "irdaapplet/irdaon" ); - m_irdaOffPixmap = Resource::loadPixmap( "irdaapplet/irdaoff" ); - m_irdaDiscoveryOnPixmap = Resource::loadPixmap( "irdaapplet/magglass" ); - m_receiveActivePixmap = Resource::loadPixmap( "irdaapplet/receive" ); + m_irdaOnPixmap = Resource::loadImage( "irdaapplet/irdaon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize()); + m_irdaOffPixmap = Resource::loadImage( "irdaapplet/irdaoff" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize()); + m_irdaDiscoveryOnPixmap = Resource::loadImage( "irdaapplet/magglass" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize()); + m_receiveActivePixmap = Resource::loadImage( "irdaapplet/receive" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize()); m_irda_active = false; m_irda_discovery_active = false; m_receive_active = false; @@ -313,17 +314,17 @@ void IrdaApplet::timerEvent ( QTimerEvent * ) } void IrdaApplet::paintEvent ( QPaintEvent * ) { - QPainter p ( this ); + QPainter p( this ); - p. drawPixmap ( 0, 1, m_irda_active ? m_irdaOnPixmap : m_irdaOffPixmap ); + p.drawPixmap( 0, 1, m_irda_active ? m_irdaOnPixmap : m_irdaOffPixmap ); if ( m_irda_discovery_active ) - p. drawPixmap( 0, 1, m_irdaDiscoveryOnPixmap ); + p.drawPixmap( 0, 1, m_irdaDiscoveryOnPixmap ); if ( m_receive_active ) - p. drawPixmap( 0, 1, m_receiveActivePixmap ); + p.drawPixmap( 0, 1, m_receiveActivePixmap ); } /* * We know 3 calls * a) enable |