summaryrefslogtreecommitdiff
path: root/core/applets/volumeapplet/volume.cpp
Unidiff
Diffstat (limited to 'core/applets/volumeapplet/volume.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/volumeapplet/volume.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp
index 7f0aca5..7d67311 100644
--- a/core/applets/volumeapplet/volume.cpp
+++ b/core/applets/volumeapplet/volume.cpp
@@ -23,9 +23,9 @@
23/* OPIE */ 23/* OPIE */
24#include <opie2/oledbox.h> 24#include <opie2/oledbox.h>
25#include <opie2/odevice.h> 25#include <opie2/odevice.h>
26#include <opie2/otaskbarapplet.h> 26#include <opie2/otaskbarapplet.h>
27#include <qpe/resource.h> 27#include <opie2/oresource.h>
28#include <qpe/applnk.h> 28#include <qpe/applnk.h>
29#include <qpe/config.h> 29#include <qpe/config.h>
30#include <qpe/qcopenvelope_qws.h> 30#include <qpe/qcopenvelope_qws.h>
31using namespace Opie::Core; 31using namespace Opie::Core;
@@ -271,19 +271,16 @@ VolumeControl::VolumeControl ( VolumeApplet *icon, bool /*showMic*/, QWidget *pa
271 grid-> addLayout ( vbox, 1, 0 ); 271 grid-> addLayout ( vbox, 1, 0 );
272 272
273 upButton = new QPushButton ( this ); 273 upButton = new QPushButton ( this );
274 upButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding )); 274 upButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding ));
275 QPixmap pic; 275 upButton-> setPixmap ( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) );
276 pic.convertFromImage( Resource::loadImage( "up" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
277 upButton-> setPixmap ( pic );
278 upButton-> setFocusPolicy ( QWidget::NoFocus ); 276 upButton-> setFocusPolicy ( QWidget::NoFocus );
279 277
280 vbox-> addWidget ( upButton ); 278 vbox-> addWidget ( upButton );
281 279
282 downButton = new QPushButton ( this ); 280 downButton = new QPushButton ( this );
283 downButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding )); 281 downButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding ));
284 pic.convertFromImage( Resource::loadImage( "down" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); 282 downButton-> setPixmap ( Opie::Core::OResource::loadPixmap( "down", Opie::Core::OResource::SmallIcon ) );
285 downButton-> setPixmap ( pic );
286 downButton-> setFocusPolicy ( QWidget::NoFocus ); 283 downButton-> setFocusPolicy ( QWidget::NoFocus );
287 284
288 vbox-> addWidget ( downButton ); 285 vbox-> addWidget ( downButton );
289 286
@@ -726,11 +723,9 @@ VolumeApplet::VolumeApplet( QWidget *parent, const char *name )
726{ 723{
727 setFixedWidth ( AppLnk::smallIconSize() ); 724 setFixedWidth ( AppLnk::smallIconSize() );
728 setFixedHeight ( AppLnk::smallIconSize()+4 ); 725 setFixedHeight ( AppLnk::smallIconSize()+4 );
729 726
730 QPixmap pic; 727 m_pixmap = new QPixmap ( Opie::Core::OResource::loadPixmap( "volume", Opie::Core::OResource::SmallIcon ) );
731 pic.convertFromImage( Resource::loadImage( "volume" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
732 m_pixmap = new QPixmap ( pic );
733 m_dialog = new VolumeControl ( this, true, this, "volumecontrol" ); 728 m_dialog = new VolumeControl ( this, true, this, "volumecontrol" );
734 729
735 connect ( qApp, SIGNAL( volumeChanged(bool)), m_dialog, SLOT( volumeChanged(bool))); 730 connect ( qApp, SIGNAL( volumeChanged(bool)), m_dialog, SLOT( volumeChanged(bool)));
736 connect ( qApp, SIGNAL( micChanged(bool)), m_dialog, SLOT ( micChanged(bool))); 731 connect ( qApp, SIGNAL( micChanged(bool)), m_dialog, SLOT ( micChanged(bool)));