1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

* Pass in the requested avatar size so we can smoothly scale the image.

This commit is contained in:
Christian Muehlhaeuser
2012-11-15 11:34:13 +01:00
parent 356f0bff67
commit 3e55851fee
2 changed files with 9 additions and 1 deletions

View File

@@ -189,6 +189,13 @@ SourceItem::activate()
QIcon
SourceItem::icon() const
{
return pixmap();
}
QPixmap
SourceItem::pixmap( const QSize& size ) const
{
if ( m_source.isNull() )
{
@@ -199,7 +206,7 @@ SourceItem::icon() const
if ( m_source->avatar().isNull() )
return m_defaultAvatar;
else
return m_source->avatar( Source::FancyStyle );
return m_source->avatar( Source::FancyStyle, size );
}
}

View File

@@ -40,6 +40,7 @@ public:
virtual QString text() const;
virtual QString tooltip() const;
virtual QIcon icon() const;
virtual QPixmap pixmap( const QSize& size = QSize( 0, 0 ) ) const;
virtual int peerSortValue() const;
virtual int IDValue() const;