From a47c164fc96e502df06f12bd5e5dd87a1ea4f681 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Thu, 15 Nov 2012 08:36:51 +0100 Subject: [PATCH] * Optimize code for when rounded corners aren't actually wanted. --- src/libtomahawk/utils/TomahawkUtilsGui.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libtomahawk/utils/TomahawkUtilsGui.cpp b/src/libtomahawk/utils/TomahawkUtilsGui.cpp index e2600cf7c..ed6f145c1 100644 --- a/src/libtomahawk/utils/TomahawkUtilsGui.cpp +++ b/src/libtomahawk/utils/TomahawkUtilsGui.cpp @@ -330,6 +330,9 @@ createRoundedImage( const QPixmap& pixmap, const QSize& size, float frameWidthPc return QPixmap(); QPixmap scaledAvatar = pixmap.scaled( width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation ); + if ( frameWidthPct == 0.00 ) + return scaledAvatar; + QPixmap frame( width, height ); frame.fill( Qt::transparent );