1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-25 23:06:23 +02:00

fixed the off-by-one issue with avatar frames

This commit is contained in:
Michael Zanetti
2011-08-10 04:10:16 +02:00
parent 4415aa59f8
commit 3dbc426954

View File

@@ -476,7 +476,7 @@ QPixmap
createAvatarFrame( const QPixmap &avatar )
{
QPixmap frame( ":/data/images/avatar_frame.png" );
QPixmap scaledAvatar = avatar.scaled( frame.height() * 80 / 100, frame.width() * 80 / 100, Qt::KeepAspectRatio, Qt::SmoothTransformation );
QPixmap scaledAvatar = avatar.scaled( frame.height() * 75 / 100, frame.width() * 75 / 100, Qt::KeepAspectRatio, Qt::SmoothTransformation );
QPainter painter( &frame );
painter.drawPixmap( (frame.height() - scaledAvatar.height()) / 2, (frame.width() - scaledAvatar.width()) / 2, scaledAvatar );