-rw-r--r-- | kmicromail/mainwindow.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 82a915e..3dde3cd 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp | |||
@@ -365,16 +365,30 @@ void MainWindow::slotAdjustLayout() { | |||
365 | 365 | ||
366 | void MainWindow::slotAdjustColumns() | 366 | void MainWindow::slotAdjustColumns() |
367 | { | 367 | { |
368 | bool hidden = folderView->isHidden(); | 368 | |
369 | if ( hidden ) folderView->show(); | 369 | if ( !folderView->isHidden() ) |
370 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); | 370 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); |
371 | if ( hidden ) folderView->hide(); | ||
372 | 371 | ||
373 | mailView->setColumnWidth( 0, 10 ); | 372 | mailView->setColumnWidth( 0, 10 ); |
374 | mailView->setColumnWidth( 1, 100 ); | 373 | mailView->setColumnWidth( 1, 100 ); |
375 | mailView->setColumnWidth( 2, 100 ); | 374 | mailView->setColumnWidth( 2, 100 ); |
376 | mailView->setColumnWidth( 3, 70 ); | 375 | mailView->setColumnWidth( 3, 70 ); |
377 | mailView->setColumnWidth( 4, 170 ); | 376 | mailView->setColumnWidth( 4, 180 ); |
377 | if ( KOPrefs::instance()->mShowToField ) | ||
378 | mailView->setColumnWidth( 5, 100 ); | ||
379 | mailView->setColumnAlignment( 3, AlignRight); | ||
380 | mailView->setColumnAlignment( 4, AlignRight); | ||
381 | } | ||
382 | void MainWindow::slotAdjustColumnsWide() | ||
383 | { | ||
384 | if ( !folderView->isHidden() ) | ||
385 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); | ||
386 | |||
387 | mailView->setColumnWidth( 0, 10 ); | ||
388 | mailView->setColumnWidth( 1, 200 ); | ||
389 | mailView->setColumnWidth( 2, 200 ); | ||
390 | mailView->setColumnWidth( 3, 70 ); | ||
391 | mailView->setColumnWidth( 4, 180 ); | ||
378 | if ( KOPrefs::instance()->mShowToField ) | 392 | if ( KOPrefs::instance()->mShowToField ) |
379 | mailView->setColumnWidth( 5, 100 ); | 393 | mailView->setColumnWidth( 5, 100 ); |
380 | mailView->setColumnAlignment( 3, AlignRight); | 394 | mailView->setColumnAlignment( 3, AlignRight); |