From: Andreas Hartmetz Date: Sat, 12 Nov 2016 17:42:08 +0000 (+0100) Subject: Never stretch the last (=date) column in the file dialog. X-Git-Tag: archive/raspbian/5.97.0-1+rpi1~1^2^2^2^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0c87b04d440286947ceeb355b53f9435b9f3578f;p=kio.git 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 --- 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);