diff --git a/app/SysTray-X/systrayxicon.cpp b/app/SysTray-X/systrayxicon.cpp index fd8fe5e..efb778f 100644 --- a/app/SysTray-X/systrayxicon.cpp +++ b/app/SysTray-X/systrayxicon.cpp @@ -155,7 +155,11 @@ void SysTrayXIcon::renderIcon() painter.setFont( QFont("Sans") ); QString number = QString::number( m_unread_mail ); +#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) double factor = pixmap.width() / ( 3 * painter.fontMetrics().width( number ) ); +#else + double factor = pixmap.width() / ( 3 * painter.fontMetrics().horizontalAdvance( number ) ); +#endif QFont font = painter.font(); font.setPointSizeF( font.pointSizeF() * factor ); font.setBold( true );