Review Request 119546: Fix wrong text eliding in some corner cases.
Emmanuel Pescosta
emmanuelpescosta099 at gmail.com
Mon Aug 4 18:44:22 BST 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119546/
-----------------------------------------------------------
(Updated Aug. 4, 2014, 5:44 p.m.)
Status
------
This change has been marked as submitted.
Review request for Dolphin.
Bugs: 437104
http://bugs.kde.org/show_bug.cgi?id=437104
Repository: kde-baseapps
Description
-------
The problem is in KStandardItemListWidget::updateIconsLayoutTextCache().
m_customizedFontMetrics.elidedText(lastTextLine, Qt::ElideRight, maxWidth) returns a non-elided text (which is wrong in thi case) and the resulting nameWidth is bigger than maxWidth. When I replace maxWidth by "maxWidth - 1" the eliding is correct and it works fine.
I have solved it with a loop, which decreases the eliding width as long as the bounding rect width is bigger than the allowed maximum width.
Diffs
-----
dolphin/src/kitemviews/kstandarditemlistwidget.cpp 998acc0
Diff: https://git.reviewboard.kde.org/r/119546/diff/
Testing
-------
No wrong text eliding anymore :)
Thanks,
Emmanuel Pescosta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20140804/2025d72d/attachment.htm>
More information about the kfm-devel
mailing list