summaryrefslogtreecommitdiff
authordrw <drw>2005-03-02 18:54:28 (UTC)
committer drw <drw>2005-03-02 18:54:28 (UTC)
commit9f1589f7c83aed5f307b2f99018198661e84a95b (patch) (unidiff)
tree1c5c4297d88a96deba367f73c095f798bdb1c5b6
parentb9d921e98946ee787ec995f44eb1b937d669b430 (diff)
downloadopie-9f1589f7c83aed5f307b2f99018198661e84a95b.zip
opie-9f1589f7c83aed5f307b2f99018198661e84a95b.tar.gz
opie-9f1589f7c83aed5f307b2f99018198661e84a95b.tar.bz2
Scale icons approprtely
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/volumeapplet/volume.cpp11
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
@@ -271,16 +271,19 @@ 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 upButton-> setPixmap ( Resource::loadPixmap ( "up" )); 275 QPixmap pic;
276 pic.convertFromImage( Resource::loadImage( "up" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
277 upButton-> setPixmap ( pic );
276 upButton-> setFocusPolicy ( QWidget::NoFocus ); 278 upButton-> setFocusPolicy ( QWidget::NoFocus );
277 279
278 vbox-> addWidget ( upButton ); 280 vbox-> addWidget ( upButton );
279 281
280 downButton = new QPushButton ( this ); 282 downButton = new QPushButton ( this );
281 downButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding )); 283 downButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding ));
282 downButton-> setPixmap ( Resource::loadPixmap ( "down" )); 284 pic.convertFromImage( Resource::loadImage( "down" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
285 downButton-> setPixmap ( pic );
283 downButton-> setFocusPolicy ( QWidget::NoFocus ); 286 downButton-> setFocusPolicy ( QWidget::NoFocus );
284 287
285 vbox-> addWidget ( downButton ); 288 vbox-> addWidget ( downButton );
286 289
@@ -723,9 +726,11 @@ VolumeApplet::VolumeApplet( QWidget *parent, const char *name )
723{ 726{
724 setFixedWidth ( AppLnk::smallIconSize() ); 727 setFixedWidth ( AppLnk::smallIconSize() );
725 setFixedHeight ( AppLnk::smallIconSize()+4 ); 728 setFixedHeight ( AppLnk::smallIconSize()+4 );
726 729
727 m_pixmap = new QPixmap ( Resource::loadPixmap ( "volume" )); 730 QPixmap pic;
731 pic.convertFromImage( Resource::loadImage( "volume" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
732 m_pixmap = new QPixmap ( pic );
728 m_dialog = new VolumeControl ( this, true, this, "volumecontrol" ); 733 m_dialog = new VolumeControl ( this, true, this, "volumecontrol" );
729 734
730 connect ( qApp, SIGNAL( volumeChanged(bool)), m_dialog, SLOT( volumeChanged(bool))); 735 connect ( qApp, SIGNAL( volumeChanged(bool)), m_dialog, SLOT( volumeChanged(bool)));
731 connect ( qApp, SIGNAL( micChanged(bool)), m_dialog, SLOT ( micChanged(bool))); 736 connect ( qApp, SIGNAL( micChanged(bool)), m_dialog, SLOT ( micChanged(bool)));