author | mickeyl <mickeyl> | 2004-10-30 13:53:58 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-10-30 13:53:58 (UTC) |
commit | 0fc9ce0c22bad09470a18eb6d084c6042c914ed8 (patch) (side-by-side diff) | |
tree | 99e8ac2db000ce606b497ded9146ddae691d27a7 | |
parent | 3fcdb4e6f576f5e3eec072efe87a44bf58fdbf25 (diff) | |
download | opie-0fc9ce0c22bad09470a18eb6d084c6042c914ed8.zip opie-0fc9ce0c22bad09470a18eb6d084c6042c914ed8.tar.gz opie-0fc9ce0c22bad09470a18eb6d084c6042c914ed8.tar.bz2 |
remove hardcoded icon size here as well
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | core/applets/irdaapplet/irda.cpp | 25 |
2 files changed, 14 insertions, 12 deletions
@@ -20,32 +20,33 @@ Fixed Bugs ---------- * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) * #1245 - Opie-Go 'paused' (zecke) * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) * #1395 - Build VNC Backend with gcc3.4 * #1440 - The icon of opie-mobilemsg is missing (CoreDump) * #1445 - Opie-Sheet Has No Icon (CoreDump) * #1448 - Brightness Applet added (mickeyl) * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) * 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 ------------ * Fifteen gained configurable number of items (zecke) * Fifteen can have custom background images (zecke) * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) * Integrated the new security framework into libopie2 (zecke,clem) * Converted the launcher to use the new security framework (zecke) * Backup can now handle custom locations for backup and restore (ar) * Implemented right-on-hold feedback (wimpie,zecke) * Lots of new features in opie-reader (tim,pohly) * Build system cleanups (schurig) Fixed Bugs 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 @@ -5,64 +5,65 @@ ** Holger Freyther <zecke@handhelds.org> QCOP Interface ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #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> #include <qtimer.h> #include <qtextstream.h> /* STD */ #include <unistd.h> #include <net/if.h> #include <netinet/in.h> #include <sys/types.h> #include <sys/socket.h> #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; m_receive_state_changed = false; m_popup = 0; m_wasOn = false; m_wasDiscover = false; QCopChannel* chan = new QCopChannel("QPE/IrDaApplet", this ); connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), this, SLOT(slotMessage(const QCString&,const QByteArray&) ) ); } int IrdaApplet::position() { @@ -301,41 +302,41 @@ void IrdaApplet::timerEvent ( QTimerEvent * ) receiveUpdate = true; m_receive_state_changed = false; } m_irda_active = checkIrdaStatus ( ); m_irda_discovery_active = checkIrdaDiscoveryStatus ( ); if ( m_irda_discovery_active ) showDiscovered ( ); if (( m_irda_active != oldactive ) || ( m_irda_discovery_active != olddiscovery ) || receiveUpdate ) update ( ); } 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 * b) disable * a and b will temp enable the IrDa device and disable will disable it again if it wasn't on * c) listDevices: We will return a list of known devices */ void IrdaApplet::slotMessage( const QCString& str, const QByteArray& ) { if ( str == "enableIrda()") { m_wasOn = checkIrdaStatus(); m_wasDiscover = checkIrdaDiscoveryStatus(); if (!m_wasOn) { setIrdaStatus( true ); } if ( !m_wasDiscover ) { |