1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-30 14:50:12 +03:00

remove QFontMetrics deprecated code

This commit is contained in:
Michail Vourlakos 2019-12-29 11:42:05 +02:00
parent 71e5d20144
commit d62e77eca7

View File

@ -63,7 +63,7 @@ void LayoutNameDelegate::paint(QPainter *painter, const QStyleOptionViewItem &op
//! font metrics
QFontMetrics fm(option.font);
int textWidth = fm.width(nameText);
int textWidth = fm.boundingRect(nameText).width();
int thick = option.rect.height();
int length = showTwoIcons ? (2 * thick + 2) : thick;