mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-17 03:24:15 +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 <QCoreApplication>
|
||||||
|
|
||||||
#include "utils/logger.h"
|
#include "utils/logger.h"
|
||||||
#include "utils/tomahawkutils.h"
|
|
||||||
|
|
||||||
using namespace Tomahawk;
|
using namespace Tomahawk;
|
||||||
|
|
||||||
@@ -130,7 +129,7 @@ QPixmap
|
|||||||
Source::avatar() const
|
Source::avatar() const
|
||||||
{
|
{
|
||||||
if( !m_avatar.isNull() )
|
if( !m_avatar.isNull() )
|
||||||
return TomahawkUtils::createAvatarFrame( m_avatar );
|
return m_avatar;
|
||||||
else
|
else
|
||||||
return QPixmap();
|
return QPixmap();
|
||||||
}
|
}
|
||||||
|
@@ -159,15 +159,17 @@ CollectionItem::activate()
|
|||||||
QIcon
|
QIcon
|
||||||
CollectionItem::icon() const
|
CollectionItem::icon() const
|
||||||
{
|
{
|
||||||
|
QPixmap pixmap;
|
||||||
if( m_source.isNull() )
|
if( m_source.isNull() )
|
||||||
return QIcon( RESPATH "images/supercollection.png" );
|
pixmap = QPixmap( RESPATH "images/supercollection.png" );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( m_source->avatar().isNull() )
|
if( m_source->avatar().isNull() )
|
||||||
return QIcon( RESPATH "images/user-avatar.png" );
|
pixmap = QPixmap( RESPATH "images/user-avatar.png" );
|
||||||
else
|
else
|
||||||
return QIcon( m_source->avatar() );
|
pixmap = m_source->avatar();
|
||||||
}
|
}
|
||||||
|
return QIcon( TomahawkUtils::createAvatarFrame( pixmap ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user