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