https://bugs.kde.org/show_bug.cgi?id=432530
Méven <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Latest Commit|https://invent.kde.org/syst |https://invent.kde.org/syst |em/dolphin/-/commit/05194fd |em/dolphin/-/commit/333ba3e |525071e41678d31b93146fad2e6 |8866c71ef4be4064a979f5a34f2 |e2e451 |04128a --- Comment #43 from Méven <[email protected]> --- Git commit 333ba3e8866c71ef4be4064a979f5a34f204128a by Méven Car. Committed on 04/11/2025 at 10:32. Pushed by meven into branch 'release/25.08'. icon view: fix file names overflowing after text eliding aba0de7301b060c40d543adbaa8d53cf69a9d7ee re-introduced the usage of QFontMetrics::boundingRect(QString) for calculating the size of the last line of a filename. ..Unfortunately, that function uses a different code path from QTextLayout, and arrives at a shorter width for a line of text. Meanwhile, QFontMetrics::size(QString) internally uses QFontMetric::boundingRect(QRect, int, QString, ..), which has been documented as "The bounding rectangle returned by this function is somewhat larger than that calculated by the simpler boundingRect() function. This function uses the maximum left and right font bearings as is necessary for multi-line text to align correctly." I have empirically confirmed that QFontMetricsF::size and QTextLine::naturalTextWidth return the same floating-point value given the same input, and QFontMetrics::size does internally use QTextLine::naturalTextWidth through qt_format_text. (cherry picked from commit 05194fd525071e41678d31b93146fad2e6e2e451) Co-authored-by: Bojidar Marinov <[email protected]> M +1 -1 src/kitemviews/kstandarditemlistwidget.cpp https://invent.kde.org/system/dolphin/-/commit/333ba3e8866c71ef4be4064a979f5a34f204128a -- You are receiving this mail because: You are watching all bug changes.
