author | drw <drw> | 2005-04-03 17:21:58 (UTC) |
---|---|---|
committer | drw <drw> | 2005-04-03 17:21:58 (UTC) |
commit | be7d04d2b402e5515cfac3a2b32ed5831e15340b (patch) (side-by-side diff) | |
tree | ed5829eb8cd46c222fc9e201c5a08a28fca23c87 | |
parent | 5929a5467aacf1b95a570bdb560d03b28d9ae679 (diff) | |
download | opie-be7d04d2b402e5515cfac3a2b32ed5831e15340b.zip opie-be7d04d2b402e5515cfac3a2b32ed5831e15340b.tar.gz opie-be7d04d2b402e5515cfac3a2b32ed5831e15340b.tar.bz2 |
Fix buttons so images scale correctly
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp index 069b625..8b53038 100644 --- a/libopie2/opieui/fileselector/ofileselector.cpp +++ b/libopie2/opieui/fileselector/ofileselector.cpp @@ -315,79 +315,85 @@ QString OFileSelectorItem::key( int id, bool )const OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& startDir, OFileSelector* sel) :QWidget( parent ), m_sel( sel ) { m_all = false; QVBoxLayout* lay = new QVBoxLayout( this ); m_currentDir = startDir; /* * now we add a special bar * One Button For Up * Home * Doc * And a dropdown menu with FileSystems * FUTURE: one to change dir with lineedit * Bookmarks * Create Dir */ QHBox* box = new QHBox(this ); box->setBackgroundMode( PaletteButton ); box->setSpacing( 0 ); QPixmap pic; QToolButton *btn = new QToolButton( box ); + btn->setUsesBigPixmap( true ); 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->setUsesBigPixmap( true ); 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->setUsesBigPixmap( true ); 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->setUsesBigPixmap( true ); pic.convertFromImage( Resource::loadImage( "new" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); m_btnNew->setPixmap( pic ); connect(m_btnNew, SIGNAL(clicked() ), this, SLOT(slotNew() ) ); m_btnClose = new QToolButton( box ); + m_btnClose->setUsesBigPixmap( true ); pic.convertFromImage( Resource::loadImage( "close" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); m_btnClose->setPixmap( pic ); connect(m_btnClose, SIGNAL(clicked() ), selector(), SIGNAL(closeMe() ) ); btn = new QToolButton( box ); + btn->setUsesBigPixmap( true ); pic.convertFromImage( Resource::loadImage( "cardmon/pcmcia" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); btn->setPixmap( pic ); m_fsButton = btn; /* let's fill device parts */ QPopupMenu* pop = new QPopupMenu(this); connect(pop, SIGNAL( activated(int) ), this, SLOT(slotFSActivated(int) ) ); StorageInfo storage; const QList<FileSystem> &fs = storage.fileSystems(); QListIterator<FileSystem> it(fs); for ( ; it.current(); ++it ) { const QString disk = (*it)->name(); const QString path = (*it)->path(); m_dev.insert( disk, path ); pop->insertItem( disk ); } m_fsPop = pop; connect(btn,SIGNAL(pressed()),this,SLOT(slotFSpressed())); lay->addWidget( box ); |