1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-24 14:42:53 +02:00

* Fixed y-axis shifted fonts for default avatar on OS X.

This commit is contained in:
Christian Muehlhaeuser
2014-09-01 04:38:32 +02:00
parent 08e35b3bf3
commit f483477240

View File

@@ -324,7 +324,13 @@ Source::avatar( TomahawkUtils::ImageMode style, const QSize& size, bool defaultA
f.setPixelSize( px.size().height() - 8 );
p.setFont( f );
p.setPen( Qt::white );
p.drawText( px.rect().adjusted( 0, 2, 0, 0 ), friendlyName().left( 1 ).toUpper(), QTextOption( Qt::AlignCenter ) );
#ifdef Q_OS_MAC
const QRect pxRect = px.rect();
#else
const QRect pxRect = pxRect.adjusted( 0, 2, 0, 0 );
#endif
p.drawText( pxRect, friendlyName().left( 1 ).toUpper(), QTextOption( Qt::AlignCenter ) );
return px;
}
else