mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-02-24 11:53:09 +01:00
make collectionitems icons used not hardcoded, and add supercollection icon
This commit is contained in:
parent
9ee970489c
commit
4eaff359f0
BIN
data/images/supercollection.png
Normal file
BIN
data/images/supercollection.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.7 KiB |
@ -76,6 +76,9 @@
|
||||
<file>./data/images/music-icon.png</file>
|
||||
<file>./data/images/configure.png</file>
|
||||
<file>./data/images/create-playlist.png</file>
|
||||
<file>./data/images/add.png</file>
|
||||
<file>./data/images/recently-played.png</file>
|
||||
<file>./data/images/supercollection.png</file>
|
||||
<file>./data/topbar-radiobuttons.css</file>
|
||||
<file>./data/icons/tomahawk-icon-16x16.png</file>
|
||||
<file>./data/icons/tomahawk-icon-32x32.png</file>
|
||||
|
@ -39,7 +39,7 @@ SourcesModel::SourcesModel( QObject* parent )
|
||||
appendItem( source_ptr() );
|
||||
|
||||
// add misc children of root node
|
||||
GenericPageItem* recent = new GenericPageItem( this, m_rootItem->children().at( 0 ), tr( "Recently Played" ), QIcon( RESPATH "images/home.png" ) );
|
||||
GenericPageItem* recent = new GenericPageItem( this, m_rootItem->children().at( 0 ), tr( "Recently Played" ), QIcon( RESPATH "images/recently-played.png" ) );
|
||||
connect( recent, SIGNAL( activated() ), PlaylistManager::instance(), SLOT( showWelcomePage() ) );
|
||||
|
||||
onSourcesAdded( SourceList::instance()->sources() );
|
||||
|
@ -276,7 +276,7 @@ CategoryAddItem::flags() const
|
||||
QIcon
|
||||
CategoryAddItem::icon() const
|
||||
{
|
||||
return QIcon( RESPATH "images/create-playlist.png" );
|
||||
return QIcon( RESPATH "images/add.png" );
|
||||
}
|
||||
|
||||
// CategoryItem
|
||||
@ -374,6 +374,15 @@ CollectionItem::activate()
|
||||
}
|
||||
}
|
||||
|
||||
QIcon
|
||||
CollectionItem::icon() const
|
||||
{
|
||||
if( m_source.isNull() )
|
||||
return QIcon( RESPATH "images/supercollection.png" );
|
||||
else
|
||||
return QIcon( RESPATH "images/user-avatar.png" );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CollectionItem::onPlaylistsAdded( const QList< playlist_ptr >& playlists )
|
||||
|
@ -128,6 +128,7 @@ public:
|
||||
|
||||
virtual QString text() const;
|
||||
virtual void activate();
|
||||
virtual QIcon icon() const;
|
||||
|
||||
Tomahawk::source_ptr source() const;
|
||||
|
||||
|
@ -466,7 +466,7 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
|
||||
}
|
||||
|
||||
QRect iconRect = option.rect.adjusted( 4, 6, -option.rect.width() + option.rect.height() - 12 + 4, -6 );
|
||||
painter->drawPixmap( iconRect, QPixmap( RESPATH "images/user-avatar.png" ).scaledToHeight( iconRect.height(), Qt::SmoothTransformation ) );
|
||||
painter->drawPixmap( iconRect, item->icon().pixmap( iconRect.size() ) );
|
||||
|
||||
if ( ( option.state & QStyle::State_Selected ) == QStyle::State_Selected )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user