Bug 326210 - Dolphin unnecessarily truncates names of soft links in compact mode
Summary: Dolphin unnecessarily truncates names of soft links in compact mode
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Unclassified
Component: view-engine: compact mode (show other bugs)
Version: 4.11.5
Platform: Fedora RPMs Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL: https://bugs.kde.org/attachment.cgi?i...
Keywords: investigated, reproducible
Depends on:
Blocks:
 
Reported: 2013-10-18 15:11 UTC by bob53181
Modified: 2014-03-06 13:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.13.0


Attachments
My Font Settings (73.86 KB, image/png)
2013-10-18 15:16 UTC, bob53181
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bob53181 2013-10-18 15:11:40 UTC
Dolphin unnecessarily truncates names of symbolic links in compact mode while keeping names of other files non-truncated.

Reproducible: Always

Steps to Reproduce:
1. Switch Dolphin view to compact
2. Create a file
3. Create symbolic link to this file
Actual Results:  
The symlink gets truncated while the file does not.

Expected Results:  
The files and the symlinks should be truncated to the same width.

This is similar to [this bug](https://bugs.kde.org/show_bug.cgi?id=183620)
I am using Fedora 19, kde-workspace-4.11.2-1, qt-4.8.5-10
Comment 1 bob53181 2013-10-18 15:16:58 UTC
Created attachment 82928 [details]
My Font Settings

This is a screenshot of my font settings - maybe that makes it reproducible more easily (as suggested by Frank Reininghaus).

The screenshot of the actual bug is here: http://bugsfiles.kde.org/attachment.cgi?id=82911
Comment 2 Frank Reininghaus 2013-10-18 17:33:02 UTC
Thanks for the report! I could reproduce the problem now.

The problem is in the function

KStandardItemListWidgetInformant::itemSizeHint(int index, const KItemListView* view),

which calculates the width that an item in Compact View requires. It calculates how many pixels the file name would require if it was not italic, but the width for the italic version may be slightly higher. When the view tries to render the text on the screen, it finds that the pre-calculated width is insufficient, and elides the name.
Comment 3 Emmanuel Pescosta 2014-02-27 14:14:02 UTC
Review-Request: https://git.reviewboard.kde.org/r/116121/
Comment 4 Emmanuel Pescosta 2014-03-06 13:02:40 UTC
Git commit b892058730544d53e0c08e32dc297f2f1256f9ae by Emmanuel Pescosta.
Committed on 05/03/2014 at 09:48.
Pushed by emmanuelp into branch 'KDE/4.13'.

Fix Bug 326210 - Dolphin unnecessarily truncates names of soft links in compact mode

FIXED-IN: 4.13.0
Related: bug 310592
REVIEW: 116121

M  +18   -0    dolphin/src/kitemviews/kfileitemlistwidget.cpp
M  +2    -0    dolphin/src/kitemviews/kfileitemlistwidget.h
M  +31   -5    dolphin/src/kitemviews/kstandarditemlistwidget.cpp
M  +12   -0    dolphin/src/kitemviews/kstandarditemlistwidget.h

http://commits.kde.org/kde-baseapps/b892058730544d53e0c08e32dc297f2f1256f9ae