summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/fileBrowser.cpp46
-rw-r--r--core/apps/textedit/textedit.cpp1
2 files changed, 31 insertions, 16 deletions
diff --git a/core/apps/textedit/fileBrowser.cpp b/core/apps/textedit/fileBrowser.cpp
index c16bd41..2e88067 100644
--- a/core/apps/textedit/fileBrowser.cpp
+++ b/core/apps/textedit/fileBrowser.cpp
@@ -21,4 +21,5 @@
#include <qfile.h>
#include <qmessagebox.h>
+#include <qlayout.h>
#include <unistd.h>
@@ -29,30 +30,43 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags
{
if ( !name )
- setName( "fileBrowser" );
- resize( 240, 280 );
+ setName( "fileBrowser" );
setCaption(tr( name ) );
filterStr=filter;
+ QGridLayout *layout = new QGridLayout( this );
+ layout->setSpacing( 4 );
+ layout->setMargin( 4 );
+
+
dirLabel = new QLabel(this, "DirLabel");
dirLabel->setText(currentDir.canonicalPath());
- dirLabel->setGeometry(10,20,230,15);
+ dirLabel->setMinimumSize( QSize( 50, 15 ) );
+ dirLabel->setMaximumSize( QSize( 250, 15 ) );
+ layout->addWidget( dirLabel, 0, 0 );
- homeButton = new QPushButton( Resource::loadIconSet("home"),"",this,"homeButton");
- homeButton->setGeometry(200,4,25,25);
- connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) );
- homeButton->setFlat(TRUE);
+ hideButton = new QPushButton( Resource::loadIconSet("s_hidden"),"",this,"hideButton");
+ hideButton->setMinimumSize( QSize( 25, 25 ) );
+ hideButton->setMaximumSize( QSize( 25, 25 ) );
+ connect( hideButton,SIGNAL(toggled(bool)),this,SLOT( hideButtonPushed(bool)) );
+ hideButton->setToggleButton(TRUE);
+ hideButton->setFlat(TRUE);
+ layout->addWidget( hideButton, 0, 1 );
docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton");
- docButton->setGeometry(170,4,25,25);
+ docButton->setMinimumSize( QSize( 25, 25 ) );
+ docButton->setMaximumSize( QSize( 25, 25 ) );
connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) );
docButton->setFlat(TRUE);
+ layout->addWidget( docButton, 0, 2 );
+
+ homeButton = new QPushButton( Resource::loadIconSet("home"),"",this,"homeButton");
+ homeButton->setMinimumSize( QSize( 25, 25 ) );
+ homeButton->setMaximumSize( QSize( 25, 25 ) );
+ connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) );
+ homeButton->setFlat(TRUE);
+ layout->addWidget( homeButton, 0, 3 );
- hideButton = new QPushButton( Resource::loadIconSet("s_hidden"),"",this,"hideButton");
- hideButton->setGeometry(140,4,25,25);
- connect( hideButton,SIGNAL(toggled(bool)),this,SLOT( hideButtonPushed(bool)) );
- hideButton->setToggleButton(TRUE);
- hideButton->setFlat(TRUE);
-
ListView = new QListView( this, "ListView" );
+ ListView->setMinimumSize( QSize( 100, 25 ) );
ListView->addColumn( tr( "Name" ) );
ListView->setColumnWidth(0,140);
@@ -67,5 +81,5 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags
ListView->setAllColumnsShowFocus( TRUE );
- ListView->setGeometry( QRect( 10, 35, 220, 240 ) );
+ layout->addMultiCellWidget( ListView, 1, 1, 0, 3 );
// signals and slots connections
@@ -76,5 +90,5 @@ fileBrowser::fileBrowser( QWidget* parent, const char* name, bool modal, WFlags
populateList();
- move(0,15);
+ move(0,15);
}
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index c46f089..3a189cb 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -541,4 +541,5 @@ void TextEdit::newFileOpen()
{
browseForFiles=new fileBrowser(this,"Open File",TRUE,0, "*");
+ browseForFiles->showMaximized();
if( browseForFiles->exec() != -1 ) {
QString selFile= browseForFiles->selectedFileName;