From 0c87b04d440286947ceeb355b53f9435b9f3578f Mon Sep 17 00:00:00 2001 From: Andreas Hartmetz Date: Sat, 12 Nov 2016 18:42:08 +0100 Subject: [PATCH] Never stretch the last (=date) column in the file dialog. Stretching the date column makes it appear to need the excessive width when adding up non-name column widths in expandNameColumn(). The name column consequently became too narrow. Now why could the date column expand if the names needed a lot of space? It probably has something to do with expandNameColumn() being called several times while the directory model is loading and the exact order in which things are updated. Needs a more detailed analysis if this change causes a regression or still doesn't completely fix the problem. BUG: 312747 Gbp-Pq: Name Never-stretch-the-last-date-column-in-the-file-dialog.patch --- src/filewidgets/kdiroperatordetailview.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/filewidgets/kdiroperatordetailview.cpp b/src/filewidgets/kdiroperatordetailview.cpp index 247f97c..491aea5 100644 --- a/src/filewidgets/kdiroperatordetailview.cpp +++ b/src/filewidgets/kdiroperatordetailview.cpp @@ -91,7 +91,6 @@ bool KDirOperatorDetailView::setViewMode(KFile::FileView viewMode) // using KDirOperator in horizontally limited parts of an app. if (tree && m_hideDetailColumns) { header()->setSectionResizeMode(QHeaderView::ResizeToContents); - header()->setStretchLastSection(false); } return true; @@ -102,7 +101,7 @@ bool KDirOperatorDetailView::event(QEvent *event) if (event->type() == QEvent::Polish) { QHeaderView *headerView = header(); headerView->setSectionResizeMode(QHeaderView::Interactive); - headerView->setStretchLastSection(true); + headerView->setStretchLastSection(false); headerView->setSectionsMovable(false); setColumnHidden(KDirModel::Size, m_hideDetailColumns); -- 2.30.2