diff --git a/src/libtomahawk/utils/TomahawkUtilsGui.cpp b/src/libtomahawk/utils/TomahawkUtilsGui.cpp index 9fdad47c4..e2600cf7c 100644 --- a/src/libtomahawk/utils/TomahawkUtilsGui.cpp +++ b/src/libtomahawk/utils/TomahawkUtilsGui.cpp @@ -329,8 +329,6 @@ createRoundedImage( const QPixmap& pixmap, const QSize& size, float frameWidthPc if ( !height || !width ) return QPixmap(); - int frameWidth = (float)width * frameWidthPct; - QPixmap scaledAvatar = pixmap.scaled( width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation ); QPixmap frame( width, height ); frame.fill( Qt::transparent ); @@ -346,11 +344,11 @@ createRoundedImage( const QPixmap& pixmap, const QSize& size, float frameWidthPc painter.setBrush( brush ); painter.setPen( pen ); - painter.drawRoundedRect( outerRect, frameWidth * 2, frameWidth * 2 ); + painter.drawRoundedRect( outerRect, frameWidthPct * 100.0, frameWidthPct * 100.0, Qt::RelativeSize ); /* painter.setBrush( Qt::transparent ); painter.setPen( Qt::white ); - painter.drawRoundedRect( outerRect, frameWidth * 2, frameWidth * 2 ); */ + painter.drawRoundedRect( outerRect, frameWidthPct, frameWidthPct, Qt::RelativeSize ); */ return frame; } diff --git a/src/libtomahawk/utils/TomahawkUtilsGui.h b/src/libtomahawk/utils/TomahawkUtilsGui.h index 086350e63..a9673c46e 100644 --- a/src/libtomahawk/utils/TomahawkUtilsGui.h +++ b/src/libtomahawk/utils/TomahawkUtilsGui.h @@ -48,7 +48,7 @@ namespace TomahawkUtils DLLEXPORT void openUrl( const QUrl& url ); - DLLEXPORT QPixmap createRoundedImage( const QPixmap& avatar, const QSize& size, float frameWidthPct = 0.10 ); + DLLEXPORT QPixmap createRoundedImage( const QPixmap& avatar, const QSize& size, float frameWidthPct = 0.20 ); DLLEXPORT QColor alphaBlend( const QColor& colorFrom, const QColor& colorTo, float opacity ); DLLEXPORT QPixmap createDragPixmap( MediaType type, int itemCount = 1 );