]> cloud.milkyroute.net Git - dolphin.git/commit
Fix selection rect after porting from QFontMetrics::width()
authorIsmael Asensio <isma.af@gmail.com>
Sun, 12 Jul 2020 21:28:02 +0000 (21:28 +0000)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Sun, 12 Jul 2020 21:28:02 +0000 (21:28 +0000)
commit76a46fd9094b17eb99e8a42cca8562fdc0b3814c
tree43cf5dc93b9e72f47fcc00d38cec751caebd795a
parent2fc117703f304ba053e2b58b692609f9632535d7
Fix selection rect after porting from QFontMetrics::width()

After porting from QFontMetrics::width() to QFontMetrics::boundigRect().width() in system/dolphin!10 we have a visual bug on selection rects, that can be seen on details and compact modes.

While from https://kdepepo.wordpress.com/2019/08/05/about-deprecation-of-qfontmetricswidth/ the use of `boundingRect()` would seem the right option to use (and I struggle to get the difference between the two methods when applied to a whole string and not a single char), in this case the `horizontalAdvance()` seems to return the value we need.

BUG: 421973
FIXED-IN: 20.07.70
src/kitemviews/kstandarditemlistwidget.cpp