From bc3662a997701450cc7b4a8fee9d33bc1056d1cb Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Wed, 10 Aug 2011 17:19:00 +0200 Subject: [PATCH] added the avatar frame also to the Collection and SuperCollection icons BUG: TWK-337 --- src/libtomahawk/source.cpp | 3 +-- src/sourcetree/items/collectionitem.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libtomahawk/source.cpp b/src/libtomahawk/source.cpp index 191906833..4845b78ab 100644 --- a/src/libtomahawk/source.cpp +++ b/src/libtomahawk/source.cpp @@ -30,7 +30,6 @@ #include #include "utils/logger.h" -#include "utils/tomahawkutils.h" using namespace Tomahawk; @@ -130,7 +129,7 @@ QPixmap Source::avatar() const { if( !m_avatar.isNull() ) - return TomahawkUtils::createAvatarFrame( m_avatar ); + return m_avatar; else return QPixmap(); } diff --git a/src/sourcetree/items/collectionitem.cpp b/src/sourcetree/items/collectionitem.cpp index 84abafbcd..d3ec1660b 100644 --- a/src/sourcetree/items/collectionitem.cpp +++ b/src/sourcetree/items/collectionitem.cpp @@ -159,15 +159,17 @@ CollectionItem::activate() QIcon CollectionItem::icon() const { + QPixmap pixmap; if( m_source.isNull() ) - return QIcon( RESPATH "images/supercollection.png" ); + pixmap = QPixmap( RESPATH "images/supercollection.png" ); else { if( m_source->avatar().isNull() ) - return QIcon( RESPATH "images/user-avatar.png" ); + pixmap = QPixmap( RESPATH "images/user-avatar.png" ); else - return QIcon( m_source->avatar() ); + pixmap = m_source->avatar(); } + return QIcon( TomahawkUtils::createAvatarFrame( pixmap ) ); }