From 934dae61a04966616c105dbabfe4576ab7608e62 Mon Sep 17 00:00:00 2001 From: drw Date: Fri, 25 Mar 2005 00:19:13 +0000 Subject: Fix for bug #1613 - scale file dialog icons appropriately --- diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp index dbba4b9..2746732 100644 --- a/libopie2/opieui/fileselector/ofileselector.cpp +++ b/libopie2/opieui/fileselector/ofileselector.cpp @@ -334,34 +334,41 @@ OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& st box->setBackgroundMode( PaletteButton ); box->setSpacing( 0 ); + QPixmap pic; QToolButton *btn = new QToolButton( box ); - btn->setIconSet( Resource::loadIconSet("up") ); + pic.convertFromImage( Resource::loadImage( "up" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); + btn->setPixmap( pic ); connect(btn, SIGNAL(clicked() ), this, SLOT( cdUP() ) ); btn = new QToolButton( box ); - btn->setIconSet( Resource::loadIconSet("home") ); + pic.convertFromImage( Resource::loadImage( "home" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); + btn->setPixmap( pic ); connect(btn, SIGNAL(clicked() ), this, SLOT( cdHome() ) ); btn = new QToolButton( box ); - btn->setIconSet( Resource::loadIconSet("DocsIcon") ); + pic.convertFromImage( Resource::loadImage( "DocsIcon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); + btn->setPixmap( pic ); connect(btn, SIGNAL(clicked() ), this, SLOT(cdDoc() ) ); m_btnNew = new QToolButton( box ); - m_btnNew->setIconSet( Resource::loadIconSet("new") ); + pic.convertFromImage( Resource::loadImage( "new" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); + btn->setPixmap( pic ); connect(m_btnNew, SIGNAL(clicked() ), this, SLOT(slotNew() ) ); m_btnClose = new QToolButton( box ); - m_btnClose->setIconSet( Resource::loadIconSet("close") ); + pic.convertFromImage( Resource::loadImage( "close" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); + btn->setPixmap( pic ); connect(m_btnClose, SIGNAL(clicked() ), selector(), SIGNAL(closeMe() ) ); btn = new QToolButton( box ); - btn->setIconSet( Resource::loadIconSet("cardmon/pcmcia") ); + pic.convertFromImage( Resource::loadImage( "cardmon/pcmcia" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); + btn->setPixmap( pic ); m_fsButton = btn; /* let's fill device parts */ -- cgit v0.9.0.2