mirror of
https://github.com/Ximi1970/systray-x.git
synced 2026-05-06 19:45:57 +02:00
Fix for Qt 5.14
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user