From 142e7e82efa6dd45884805c34fadec2160225e4b Mon Sep 17 00:00:00 2001 From: mickeyl Date: Mon, 29 Aug 2005 21:27:26 +0000 Subject: - paint discovery pixmap if applicable - Resource -> OResource - fix off-by-one bug in paint() --- diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp index 48698b6..e1c2341 100644 --- a/noncore/net/opietooth/applet/bluezapplet.cpp +++ b/noncore/net/opietooth/applet/bluezapplet.cpp @@ -33,10 +33,10 @@ #include #include #include +#include #include #include #include -#include using namespace Opie::Core; /* QT */ @@ -58,12 +58,12 @@ namespace OpieTooth { BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { setFixedHeight( AppLnk::smallIconSize() ); setFixedWidth( AppLnk::smallIconSize() ); - bluezOnPixmap = Resource::loadImage( "bluetoothapplet/bluezon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); - bluezOffPixmap = Resource::loadImage( "bluetoothapplet/bluezoff" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); - //bluezDiscoveryOnPixmap = Resource::loadImage( "bluetoothapplet/magglass" )smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize()); + bluezOnPixmap = OResource::loadImage( "bluetoothapplet/bluezon", OResource::SmallIcon ); + bluezOffPixmap = OResource::loadImage( "bluetoothapplet/bluezoff", Opie::Core::OResource::SmallIcon ); + bluezDiscoveryOnPixmap = OResource::loadImage( "bluetoothapplet/bluezondiscovery", Opie::Core::OResource::SmallIcon ); startTimer(4000); btDevice = 0; - btManager = 0; + btManager = 0; bluezactive = false; bluezDiscoveryActive = false; @@ -270,13 +270,13 @@ int BluezApplet::position() odebug << "paint bluetooth pixmap" << oendl; if (bluezactive > 0) { - p.drawPixmap( 0, 1, bluezOnPixmap ); + p.drawPixmap( 0, 0, bluezOnPixmap ); } else { - p.drawPixmap( 0, 1, bluezOffPixmap ); + p.drawPixmap( 0, 0, bluezOffPixmap ); } if (bluezDiscoveryActive > 0) { - p.drawPixmap( 0, 1, bluezDiscoveryOnPixmap ); + p.drawPixmap( 0, 0, bluezDiscoveryOnPixmap ); } } }; diff --git a/noncore/net/opietooth/applet/bluezapplet.h b/noncore/net/opietooth/applet/bluezapplet.h index 3b99c0f..c096e29 100644 --- a/noncore/net/opietooth/applet/bluezapplet.h +++ b/noncore/net/opietooth/applet/bluezapplet.h @@ -60,7 +60,7 @@ public slots: private: Device* btDevice; - Manager *btManager; + Manager *btManager; QPixmap bluezOnPixmap; QPixmap bluezOffPixmap; QPixmap bluezDiscoveryOnPixmap; -- cgit v0.9.0.2