From 3fc96ef97bbea25418bb22a18e82f6b874eedb38 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 22 Mar 2012 15:39:07 +0100 Subject: Details view: Expand the name-column like in Dolphin 1.x With the new view-engine the name-column always has been expanded to the maximum width of all available names. But this makes it impossible to see other columns without scrolling when having long filenames, so per default the Dolphin 1.x behavior has been applied to the new view-engine so that the name-column-width gets decreased to be able to show the other columns. This patch will be released with KDE applications 4.8.2. For Dolphin 2.1 (KDE applications 4.9) user-modified widths of the columns will be remembered per directory also between different sessions. CCBUG: 264434 --- src/kitemviews/kfileitemlistview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/kitemviews/kfileitemlistview.cpp') diff --git a/src/kitemviews/kfileitemlistview.cpp b/src/kitemviews/kfileitemlistview.cpp index 796a45099..54d858c1e 100644 --- a/src/kitemviews/kfileitemlistview.cpp +++ b/src/kitemviews/kfileitemlistview.cpp @@ -513,7 +513,7 @@ QSizeF KFileItemListView::visibleRoleSizeHint(int index, const QByteArray& role) if (role == "name") { // Increase the width by the expansion-toggle and the current expansion level const int expandedParentsCount = values.value("expandedParentsCount", 0).toInt(); - width += option.padding + expandedParentsCount * itemSize().height() + KIconLoader::SizeSmall; + width += option.padding + (expandedParentsCount + 1) * itemSize().height() + KIconLoader::SizeSmall; // Increase the width by the required space for the icon width += option.padding * 2 + option.iconSize; -- cgit v1.3