mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-22 08:52:12 +02:00
* Use rounded images instead of avatar frams.
This commit is contained in:
parent
d00b821eee
commit
84b963a489
src
@ -118,7 +118,7 @@ TreeModel::fetchMore( const QModelIndex& parent )
|
||||
}
|
||||
else if ( !parentItem->album().isNull() )
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO << "Loading Album:" << parentItem->album()->name();
|
||||
tDebug() << Q_FUNC_INFO << "Loading Album:" << parentItem->album()->artist()->name() << parentItem->album()->name() << parentItem->album()->id();
|
||||
addTracks( parentItem->album(), parent );
|
||||
}
|
||||
else
|
||||
@ -261,7 +261,7 @@ TreeModel::addCollection( const collection_ptr& collection )
|
||||
connect( collection.data(), SIGNAL( changed() ), SLOT( onCollectionChanged() ), Qt::UniqueConnection );
|
||||
|
||||
if ( !collection->source()->avatar().isNull() )
|
||||
setIcon( collection->source()->avatar() );
|
||||
setIcon( collection->source()->avatar( Source::FancyStyle ) );
|
||||
|
||||
if ( collection->source()->isLocal() )
|
||||
setTitle( tr( "My Collection" ) );
|
||||
@ -379,6 +379,7 @@ TreeModel::onTracksFound( const QList<Tomahawk::query_ptr>& tracks, Tomahawk::Mo
|
||||
|
||||
Tomahawk::Album* album = qobject_cast<Tomahawk::Album*>( sender() );
|
||||
|
||||
tDebug() << "Adding album:" << album->artist()->name() << album->name() << album->id();
|
||||
QModelIndex idx = indexFromAlbum( album->weakRef().toStrongRef() );
|
||||
tDebug() << "Adding tracks" << tracks.count() << "to index:" << idx;
|
||||
onTracksAdded( tracks, idx );
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
m_playlistIcon = QPixmap( RESPATH "images/playlist-icon.png" );
|
||||
m_autoIcon = QPixmap( RESPATH "images/automatic-playlist.png" );
|
||||
m_stationIcon = QPixmap( RESPATH "images/station.png" );
|
||||
m_defaultAvatar = TomahawkUtils::createAvatarFrame( QPixmap( RESPATH "images/user-avatar.png" ) );
|
||||
m_defaultAvatar = TomahawkUtils::createRoundedImage( QPixmap( RESPATH "images/user-avatar.png" ), QSize( 0, 0 ) );
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -57,7 +57,7 @@ SourceItem::SourceItem( SourcesModel* mdl, SourceTreeItem* parent, const Tomahaw
|
||||
{
|
||||
if ( m_source.isNull() )
|
||||
{
|
||||
m_superCol = TomahawkUtils::createAvatarFrame( QPixmap( RESPATH "images/supercollection.png" ) );
|
||||
m_superCol = TomahawkUtils::createRoundedImage( QPixmap( RESPATH "images/supercollection.png" ), QSize( 0, 0 ) );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ SourceItem::SourceItem( SourcesModel* mdl, SourceTreeItem* parent, const Tomahaw
|
||||
/* if ( ViewManager::instance()->pageForCollection( source->collection() ) )
|
||||
model()->linkSourceItemToPage( this, ViewManager::instance()->pageForCollection( source->collection() ) );*/
|
||||
|
||||
m_defaultAvatar = TomahawkUtils::createAvatarFrame( QPixmap( RESPATH "images/user-avatar.png" ) );
|
||||
m_defaultAvatar = TomahawkUtils::createRoundedImage( QPixmap( RESPATH "images/user-avatar.png" ), QSize( 0, 0 ) );
|
||||
|
||||
// load auto playlists and stations!
|
||||
|
||||
@ -191,7 +191,9 @@ QIcon
|
||||
SourceItem::icon() const
|
||||
{
|
||||
if ( m_source.isNull() )
|
||||
{
|
||||
return m_superCol;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_source->avatar().isNull() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user