-rw-r--r-- | core/applets/volumeapplet/volume.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp index 23c847d..11ba2f6 100644 --- a/core/applets/volumeapplet/volume.cpp +++ b/core/applets/volumeapplet/volume.cpp @@ -259,40 +259,43 @@ VolumeControl::VolumeControl ( VolumeApplet *icon, bool /*showMic*/, QWidget *pa setFrameStyle ( QFrame::PopupPanel | QFrame::Raised ); QGridLayout *grid = new QGridLayout ( this, 1, 1, 6, 4 ); grid-> setSpacing ( 4 ); grid-> setMargin ( 6 ); QVBoxLayout *vbox; QLabel *l; vbox = new QVBoxLayout ( ); vbox-> setSpacing ( 4 ); grid-> addLayout ( vbox, 1, 0 ); upButton = new QPushButton ( this ); upButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding )); - upButton-> setPixmap ( Resource::loadPixmap ( "up" )); + QPixmap pic; + pic.convertFromImage( Resource::loadImage( "up" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); + upButton-> setPixmap ( pic ); upButton-> setFocusPolicy ( QWidget::NoFocus ); vbox-> addWidget ( upButton ); downButton = new QPushButton ( this ); downButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding )); - downButton-> setPixmap ( Resource::loadPixmap ( "down" )); + pic.convertFromImage( Resource::loadImage( "down" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); + downButton-> setPixmap ( pic ); downButton-> setFocusPolicy ( QWidget::NoFocus ); vbox-> addWidget ( downButton ); volSlider = new QSlider ( this ); volSlider-> setRange ( 0, 100 ); volSlider-> setTickmarks ( QSlider::Both ); volSlider-> setTickInterval ( 20 ); volSlider-> setFocusPolicy ( QWidget::NoFocus ); l = new QLabel ( this ); l-> setPixmap ( QPixmap ( vol_xpm )); grid-> addWidget ( l, 0, 1, AlignCenter ); grid-> addWidget ( volSlider, 1, 1, AlignCenter ); @@ -711,33 +714,35 @@ void VolumeControl::writeConfigEntry ( const char *entry, int val, eUpdate upd ) } case UPD_None: break; } #endif } //=========================================================================== VolumeApplet::VolumeApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { setFixedWidth ( AppLnk::smallIconSize() ); setFixedHeight ( AppLnk::smallIconSize()+4 ); - m_pixmap = new QPixmap ( Resource::loadPixmap ( "volume" )); + QPixmap pic; + pic.convertFromImage( Resource::loadImage( "volume" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); + m_pixmap = new QPixmap ( pic ); m_dialog = new VolumeControl ( this, true, this, "volumecontrol" ); connect ( qApp, SIGNAL( volumeChanged(bool)), m_dialog, SLOT( volumeChanged(bool))); connect ( qApp, SIGNAL( micChanged(bool)), m_dialog, SLOT ( micChanged(bool))); } VolumeApplet::~VolumeApplet() { delete m_pixmap; } int VolumeApplet::position() { return 6; } |