Review Request 112265: Fix filename trucation issues in Icons View with maximum number of lines

Commit Hook null at kde.org
Sun Aug 25 15:28:33 BST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112265/
-----------------------------------------------------------

(Updated Aug. 25, 2013, 2:28 p.m.)


Status
------

This change has been marked as submitted.


Review request for Dolphin and Christoph Feck.


Description
-------

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 are several problems at the moment:

(a) "lastTextLine", which contains the text to be elided, is 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() is 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, is not updated correctly.

The result is that the text is 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.

The patch fixes these issues.


This addresses bugs 304558 and 321882.
    http://bugs.kde.org/show_bug.cgi?id=304558
    http://bugs.kde.org/show_bug.cgi?id=321882


Diffs
-----

  dolphin/src/kitemviews/kstandarditemlistwidget.cpp 483517e 

Diff: http://git.reviewboard.kde.org/r/112265/diff/


Testing
-------

Fixes the bugs I linked to. I have not observed any regressions so far in Icons View (also tried to enable some "additional information").


Thanks,

Frank Reininghaus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20130825/17b1e284/attachment.htm>


More information about the kfm-devel mailing list