mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-16 02:54:33 +02:00
added the avatar frame also to the Collection and SuperCollection icons
BUG: TWK-337
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
#include <QCoreApplication>
|
||||
|
||||
#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();
|
||||
}
|
||||
|
@@ -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 ) );
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user