Bug 401506

Summary: [KDirOperator] Detailed views squeeze the name column when there's not enough horizontal space, causing pain for side panels in some apps
Product: [Frameworks and Libraries] frameworks-kio Reporter: obsidian <sean>
Component: generalAssignee: David Faure <faure>
Status: CONFIRMED ---    
Severity: normal CC: adam.golanski, bugseforuns, cfeck, kdelibs-bugs, nate, piotr.mierzwinski, rjvbertin, scott, thomas.surrel
Priority: HI Keywords: usability
Version: 5.52.0   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 5.54
Sentry Crash Report:
Attachments: example over-wide dialog

Description obsidian 2018-11-28 14:50:06 UTC
SUMMARY
After upgrading to Kubuntu 18.10, I'm unable to resize the columns in Kate's file browser window under the "detailed" view.

STEPS TO REPRODUCE
1. Open Kate
2. Enable file browser plug-in
3. Switch to detailed view in file browser
4. Hover over column header divider

OBSERVED RESULT
Nothing happens, unable to resize column header.

EXPECTED RESULT
Cursor should change to indicate column can be resized, clicking and holding should enable resizing of the column.


SOFTWARE/OS VERSIONS
Kubuntu 18.10
Comment 1 Nate Graham 2018-11-28 19:53:19 UTC
This was caused by the change to auto-size all columns by default (which is a better default setting for most views): https://cgit.kde.org/kio.git/commit/?id=e504bc1fd56412ee7e9748a0dfafa537977ec1b5

Specifically, the change from:

headerView->setSectionResizeMode(QHeaderView::Interactive);

to:

headerView->setSectionResizeMode(0, QHeaderView::Stretch);
+        headerView->setSectionResizeMode(1, QHeaderView::ResizeToContents);
+        headerView->setSectionResizeMode(2, QHeaderView::ResizeToContents);

We should provide a way to turn off this behavior like Dolphin has. As a workaround, you can switch to Tree View using the two-slider icon above the file list
Comment 2 Nate Graham 2018-12-09 19:53:59 UTC
*** Bug 401807 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2018-12-10 04:43:57 UTC
*** Bug 394115 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2018-12-10 04:48:12 UTC
Git commit f28e343063783c6a0a6b925a390a1a1a5e10d91c by Nate Graham.
Committed on 10/12/2018 at 04:48.
Pushed by ngraham into branch 'master'.

[KDirOperator] Don't squeeze Name column when there isn't enough horizontal space

Summary:
When a `KDirOperator` view is used in {nav Detailed} or {nav Detailed Tree} view, when there isn't enough horizontal space, the {nav Name} column currently gets squeezed and becomes illegible.

This patch fixes that by making the name column fixed-width so it never gets too small to read the contents; instead the view sprouts a horizontal scrollbar, which is preferable.
FIXED-IN: 5.54

Test Plan:
In Kate's Filesystem Browser plugin sidebar view: {F6466450}

In the open/save dialog when there's not enough horizontal space: {F6466451}

In the open/save dialog when there //is// enough horizontal space: {F6466452}

In this case, the other columns no longer stick to the right size of the view when the window is resized, which maybe isn't as nice as current behavior. Open to suggestions.

Reviewers: #vdg, #frameworks, cullmann, cfeck

Reviewed By: cullmann, cfeck

Subscribers: cfeck, cullmann, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D17461

M  +1    -1    src/filewidgets/kdiroperatordetailview.cpp

https://commits.kde.org/kio/f28e343063783c6a0a6b925a390a1a1a5e10d91c
Comment 5 Nate Graham 2018-12-13 23:41:38 UTC
Re-opening. Had to revert that commit since it introduced a rather significant performance regression when viewing large directories. Will find another way.
Comment 6 RJVB 2019-01-18 19:37:40 UTC
Created attachment 117548 [details]
example over-wide dialog

I concur. In addition and possibly related to the fixed column size, the open dialog can turn out way too large without any possibility to reduce it in size as shown in the screenshot.
Comment 7 Nate Graham 2019-09-19 21:35:35 UTC
*** Bug 412082 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2020-02-12 22:33:43 UTC
*** Bug 416550 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2020-02-12 22:33:49 UTC
*** Bug 415331 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2020-02-12 22:33:58 UTC
*** Bug 417512 has been marked as a duplicate of this bug. ***