summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/mainwindow.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index 6e8f4d3..7af7d83 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -4,3 +4,5 @@
4#include <qtimer.h> 4#include <qtimer.h>
5#include <qlayout.h>
5 6
7#include <qpe/qpeapplication.h>
6 8
@@ -66,9 +68,17 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
66 68
67 QVBox *view = new QVBox( this ); 69 QWidget *view = new QWidget( this );
68 setCentralWidget( view ); 70 setCentralWidget( view );
69 71
72
73 QWidget *d = QApplication::desktop();
74 QBoxLayout *layout;
75
76 if ( d->width() < d->height() ) {
77 layout = new QVBoxLayout( view );
78 } else {
79 layout = new QHBoxLayout( view );
80 }
81
70 folderView = new AccountView( view ); 82 folderView = new AccountView( view );
71 folderView->header()->hide(); 83 folderView->header()->hide();
72 folderView->setMinimumHeight( 90 );
73 folderView->setMaximumHeight( 90 );
74 folderView->addColumn( tr( "Mailbox" ) ); 84 folderView->addColumn( tr( "Mailbox" ) );
@@ -76,4 +86,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
76 86
87 layout->addWidget( folderView );
88
77 mailView = new QListView( view ); 89 mailView = new QListView( view );
78 mailView->setMinimumHeight( 50 );
79 mailView->addColumn( tr( "Subject" ),QListView::Manual ); 90 mailView->addColumn( tr( "Subject" ),QListView::Manual );
@@ -83,2 +94,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
83 mailView->setSorting(-1); 94 mailView->setSorting(-1);
95
96 layout->addWidget( mailView );
97 layout->setStretchFactor( folderView, 1 );
98 layout->setStretchFactor( mailView, 2 );
99
84 connect( mailView, SIGNAL( clicked( QListViewItem * ) ),this, 100 connect( mailView, SIGNAL( clicked( QListViewItem * ) ),this,