From f483477240d8d087c77fe66596b6fbbf15993fbd Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Mon, 1 Sep 2014 04:38:32 +0200 Subject: [PATCH] * Fixed y-axis shifted fonts for default avatar on OS X. --- src/libtomahawk/Source.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libtomahawk/Source.cpp b/src/libtomahawk/Source.cpp index 86fc7733f..89e4e6452 100644 --- a/src/libtomahawk/Source.cpp +++ b/src/libtomahawk/Source.cpp @@ -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