Bug 304558 - with maximum number of rows set filename is truncated without showing it is
Summary: with maximum number of rows set filename is truncated without showing it is
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: icons mode (show other bugs)
Version: 2.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 320167 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-04 14:54 UTC by Janet
Modified: 2013-08-25 14:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janet 2012-08-04 14:54:03 UTC
Glad you implemented the maximum row number thingy in dolphin. The file names are now truncated as expected - *but* I cannot see *that* they truncated. There is nothing that gives a hint that the filename actually is longer than shown. In former dolphin versions the file name was fading at the end so it was clear it's not the ending. Can you please at least add three dots when the name is not fully shown?

Reproducible: Always

Actual Results:  
filename is just cut

Expected Results:  
filename should either fade out or three dots should be shown
Comment 1 Janet 2012-08-04 15:00:50 UTC
I just see, in some very rare cases there are three dots...
They appear when the filename is truncated behind a letter. With my files this mostly is not the case, they contain some underscores and in most cases the filename is truncated behind one of the underscores or behind a dot. But even when the name is truncated behind a special character those three dots should appear.
Comment 2 Frank Reininghaus 2012-08-07 09:39:01 UTC
Thanks for the report, I can reproduce the problem.
Comment 3 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:18:33 UTC
Resetting assignee to default as per bug #305719
Comment 4 Christoph Feck 2013-05-23 11:49:00 UTC
*** Bug 320167 has been marked as a duplicate of this bug. ***
Comment 5 Frank Reininghaus 2013-08-25 14:28:31 UTC
Git commit 82d42b8dcc9fea455d1e1cd6c060c4a2c178358e by Frank Reininghaus.
Committed on 25/08/2013 at 14:24.
Pushed by freininghaus into branch 'KDE/4.11'.

Fix filename trucation issues in Icons View with maximum number of lines

When the name of a file is too long to be shown inside the maximum
number of lines, the last line is elided. However, there were several
problems before this commit:

(a) "lastTextLine", which contains the text to be elided, was not
    assigned the complete remaining text, but only the part that would
    be put into the last line if there were more lines following. This
    may be less than what would fit into the line because we try to not
    break the text at random points.

(b) QFontMetrics::elidedText() was not given the width that is available
    for the last line (that would be maxWidth), but only the width that
    would be occupied by the text if there were more lines following
    (line.naturalTextWidth()).

(c) The variable "nameWidth", which is required to calculate the QRectF
    that is reserved for the name, was not updated correctly.

The result is that the text was sometimes trucated too early (especially
if there would be a line break early in the text if we had more lines
available), that there may be insufficient space to show the "...", and
that the hover/selection rectangle might be too narrow.
Related: bug 321882
FIXED-IN: 4.11.1
REVIEW: 112265

M  +5    -2    dolphin/src/kitemviews/kstandarditemlistwidget.cpp

http://commits.kde.org/kde-baseapps/82d42b8dcc9fea455d1e1cd6c060c4a2c178358e