Bug 352776 - Labels of file items wrap over themselves in open/save file dialog widget's Short View
Summary: Labels of file items wrap over themselves in open/save file dialog widget's S...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Debian unstable Linux
: NOR major
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords: usability
: 280420 331303 346731 379820 386864 387956 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-15 23:37 UTC by jm.ouwerkerk
Modified: 2018-04-09 22:07 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Broken layout example (1) (36.64 KB, image/png)
2015-09-15 23:37 UTC, jm.ouwerkerk
Details
Broken layout example (2) (60.48 KB, image/png)
2015-09-15 23:39 UTC, jm.ouwerkerk
Details
'Fixed' layout by selecting an entry (59.09 KB, image/png)
2015-09-15 23:41 UTC, jm.ouwerkerk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jm.ouwerkerk 2015-09-15 23:37:01 UTC
Sometimes the file dialog comes up with the labels (file names) of file items wrapping over themselves. This results in an exceedingly poor layout of the file items, because the rows appear ill-equipped to deal with line wrapping. Furthermore it looks bad, typically it is just a single letter that is wrapped.

At other times the same 'effect' occurs when hovering over a file entry in a properly laid out file dialog.

When the effect occurs, selecting or hovering over another entry tends to 'fix' the problem (temporarily).


Reproducible: Sometimes

Steps to Reproduce:
1. Open a 'open' or 'save' file dialog.
2. Observe.

Actual Results:  
See screenshots (following).


apt-cache provides some version information:
libkf5kiofilewidgets5 is at: 5.13.0-1

Using breeze theme.
Comment 1 jm.ouwerkerk 2015-09-15 23:37:46 UTC
Created attachment 94589 [details]
Broken layout example (1)

Displays broken file open dialog in Kate.
Comment 2 jm.ouwerkerk 2015-09-15 23:39:36 UTC
Created attachment 94590 [details]
Broken layout example (2)

When the file dialog is resized to a bigger, more appropriate, size the problem still persists.
Comment 3 jm.ouwerkerk 2015-09-15 23:41:28 UTC
Created attachment 94591 [details]
'Fixed' layout by selecting an entry

When selecting a file/dir entry (highlighted) the layout 'suddenly' fixes itself (temporarily). The same effect of now-you-see-me-now-you-don't can be achieved by mousing over the entries. Sometimes this actually 'scrambles' a good layout and results in the 'broken' one as showcased in the previous two screen shots.
Comment 4 Christoph Feck 2017-11-18 15:12:18 UTC
*** Bug 386864 has been marked as a duplicate of this bug. ***
Comment 5 DeMus 2018-01-07 10:58:08 UTC
Using Manjaro Linux KDE 17.1.0 Hakoila with Plasma 5.11.5, Frameworks 5.41.0 and Qt 5.10.0.
I can confirm the fact that Kdialog is not always showing filenames complete. It looks like columns don't have the correct width and text is cut-off.
When making the window larger it normally gets better, but not always.
Comment 6 Fabian Vogt 2018-01-12 08:55:07 UTC
Git commit 248941a0f4b4792b6935546da1c1e6bdda61846e by Fabian Vogt.
Committed on 12/01/2018 at 08:54.
Pushed by fvogt into branch 'master'.

Fix KFilePreviewGenerator::LayoutBlocker

Summary:
QAbstractItemViews does layout in a timer event handler to avoid unnecessary
layout calculations. Changes which cause a relayout only start the timer.
LayoutBlocker has the restriction that it only works if the event loop is not
entered during its lifetime. Without an event loop there's no expensive
relayout anyway, making the LayoutBlocker pointless in such cases.
LayoutBlocker works by changing the uniformItemSizes property of the QListView
to true and in the destructor back to the original value again. Those changes
do not trigger a relayout in QListView, so if the QListView did a layout with
uniformItemSizes set to true, it stays that way.
Fix it by triggering a relayout in ~LayoutBlocker.

This got exposed by a change in Qt, which results in QListView doing a relayout
while the LayoutBlocker is active.

Test Plan: kfilewidgettest_gui has proper item sizes now.

Reviewers: #frameworks, dfaure

Reviewed By: dfaure

Tags: #frameworks

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

M  +6    -4    src/filewidgets/kfilepreviewgenerator.cpp

https://commits.kde.org/kio/248941a0f4b4792b6935546da1c1e6bdda61846e
Comment 7 Nate Graham 2018-01-12 14:00:57 UTC
*** Bug 379820 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2018-01-12 17:51:57 UTC
*** Bug 387956 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2018-04-09 20:20:17 UTC
*** Bug 331303 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2018-04-09 21:13:30 UTC
*** Bug 346731 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2018-04-09 22:07:21 UTC
*** Bug 280420 has been marked as a duplicate of this bug. ***