author | llornkcor <llornkcor> | 2002-07-08 01:46:00 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-07-08 01:46:00 (UTC) |
commit | 6162155d2b146c7b2e713f56e215618d116cef3b (patch) (side-by-side diff) | |
tree | 65dd173dc3035f7198a99c3065203fabc08dde1b | |
parent | 923a6290c8cc93914d54e583f1d79a6bae638fab (diff) | |
download | opie-6162155d2b146c7b2e713f56e215618d116cef3b.zip opie-6162155d2b146c7b2e713f56e215618d116cef3b.tar.gz opie-6162155d2b146c7b2e713f56e215618d116cef3b.tar.bz2 |
changed qpushbutton to qtoolbutton because icons aren't centered on qushbutton
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 36 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 6 |
2 files changed, 28 insertions, 14 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 1287c57..9e38d14 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -93,40 +93,52 @@ AdvancedFm::AdvancedFm( ) menuBar->insertItem( tr( "File" ), fileMenu); menuBar->insertItem( tr( "View" ), viewMenu); - qpeDirButton= new QPushButton(Resource::loadIconSet("launcher/opielogo16x16"),"",this,"QPEButton"); + qpeDirButton= new QToolButton(this,"QPEButton"); + qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton"); +// qpeDirButton= new QPushButton(Resource::loadIconSet("launcher/opielogo16x16"),"",this,"QPEButton"); qpeDirButton ->setFixedSize( QSize( 20, 20 ) ); connect( qpeDirButton ,SIGNAL(released()),this,SLOT( QPEButtonPushed()) ); - qpeDirButton->setFlat(TRUE); + //qpeDirButton->setFlat(TRUE); layout->addMultiCellWidget( qpeDirButton , 0, 0, 2, 2); - cfButton = new QPushButton(Resource::loadIconSet("cardmon/pcmcia"),"",this,"CFButton"); + cfButton = new QToolButton( this,"CFButton"); + cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia")); +// cfButton = new QPushButton(Resource::loadIconSet("cardmon/pcmcia"),"",this,"CFButton"); cfButton ->setFixedSize( QSize( 20, 20 ) ); connect( cfButton ,SIGNAL(released()),this,SLOT( CFButtonPushed()) ); - cfButton->setFlat(TRUE); + //cfButton->setFlat(TRUE); layout->addMultiCellWidget( cfButton , 0, 0, 3, 3); - sdButton = new QPushButton(Resource::loadIconSet("sdmon/sdcard"),"",this,"SDButton"); + sdButton = new QToolButton( this,"SDButton"); + sdButton->setPixmap(Resource::loadPixmap("sdmon/sdcard")); +// sdButton = new QPushButton(Resource::loadIconSet("sdmon/sdcard"),"",this,"SDButton"); sdButton->setFixedSize( QSize( 20, 20 ) ); connect( sdButton ,SIGNAL(released()),this,SLOT( SDButtonPushed()) ); - sdButton->setFlat(TRUE); +// sdButton->setFlat(TRUE); layout->addMultiCellWidget( sdButton , 0, 0, 4, 4); - cdUpButton = new QPushButton(Resource::loadIconSet("up"),"",this,"cdUpButton"); + cdUpButton = new QToolButton( this,"cdUpButton"); + cdUpButton->setPixmap(Resource::loadPixmap("up")); +// cdUpButton = new QPushButton(Resource::loadIconSet("up"),"",this,"cdUpButton"); cdUpButton ->setFixedSize( QSize( 20, 20 ) ); connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); - cdUpButton ->setFlat(TRUE); + //cdUpButton ->setFlat(TRUE); layout->addMultiCellWidget( cdUpButton , 0, 0, 5, 5); - docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); + docButton = new QToolButton( this,"docsButton"); + docButton->setPixmap(Resource::loadPixmap("DocsIcon")); +// docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); docButton->setFixedSize( QSize( 20, 20 ) ); connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); - docButton->setFlat(TRUE); +// docButton->setFlat(TRUE); layout->addMultiCellWidget( docButton, 0, 0, 6, 6); - homeButton = new QPushButton( Resource::loadIconSet("home"),"",this,"homeButton"); + homeButton = new QToolButton( this,"homeButton"); + homeButton->setPixmap(Resource::loadPixmap("home")); +// homeButton = new QPushButton( Resource::loadIconSet("home"),"",this,"homeButton"); homeButton->setFixedSize( QSize( 20, 20 ) ); connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); - homeButton->setFlat(TRUE); +// homeButton->setFlat(TRUE); layout->addMultiCellWidget( homeButton, 0, 0, 7, 7); // fileMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); // fileMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index 0cf94c6..7335773 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h @@ -40,7 +40,8 @@ class QPopupMenu; class QFile; class QListViewItem; class QLineEdit; -class QPushButton; +//class QPushButton; +class QToolButton; class Ir; class AdvancedFm : public QMainWindow @@ -56,7 +57,8 @@ public: QLineEdit *currentPathEdit; QPopupMenu *fileMenu, *localMenu, *remoteMenu, *viewMenu; - QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; + QToolButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; +// QPushButton *homeButton, *docButton, *cdUpButton, *sdButton, *cfButton, *qpeDirButton; QDir currentDir, currentRemoteDir; QComboBox *currentPathCombo; QString filterStr; |