┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-12-01 09:49:51 +0000
committerPeter Penz <[email protected]>2007-12-01 09:49:51 +0000
commit278cb078d6815dfa85ae76ae5a184314286feacd (patch)
treec9ad5bd6d062032884c7ddd0793250dc5cb5ad66 /src
parent3b8571ec591c75be3d237ed5d15e6228f84772a5 (diff)
allow the user resizing the columns in the details view
svn path=/trunk/KDE/kdebase/apps/; revision=743538
Diffstat (limited to 'src')
-rw-r--r--src/dolphindetailsview.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp
index 55851dc95..63d90142f 100644
--- a/src/dolphindetailsview.cpp
+++ b/src/dolphindetailsview.cpp
@@ -136,7 +136,7 @@ bool DolphinDetailsView::event(QEvent* event)
{
if (event->type() == QEvent::Polish) {
QHeaderView* headerView = header();
- headerView->setResizeMode(QHeaderView::Fixed);
+ headerView->setResizeMode(QHeaderView::Interactive);
headerView->setMovable(false);
updateColumnVisibility();
@@ -322,7 +322,15 @@ void DolphinDetailsView::keyPressEvent(QKeyEvent* event)
void DolphinDetailsView::resizeEvent(QResizeEvent* event)
{
QTreeView::resizeEvent(event);
- resizeColumns();
+
+ // TODO: There seems to be no easy way to find out whether the resize event
+ // has been triggered because of resizing the window or by adjusting the column-width
+ // by a left mouse-click (the columns should only be resized automatically when the window
+ // size is adjusted). The following workaround works well, but it should be
+ // considered solving this in a more transparent way.
+ if (!(QApplication::mouseButtons() & Qt::LeftButton)) {
+ resizeColumns();
+ }
}
void DolphinDetailsView::closeEvent(QCloseEvent* event)