1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-19 07:19:42 +01:00

* Show a default track cover until we retrieved the proper, new one.

This commit is contained in:
Christian Muehlhaeuser 2013-06-12 09:23:14 +02:00
parent 890f14a23c
commit 5fdcd6c690

View File

@ -37,9 +37,7 @@ ColumnViewPreviewWidget::ColumnViewPreviewWidget( ColumnView* parent )
setVisible( false );
ui->setupUi( this );
ui->cover->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultTrackImage, TomahawkUtils::Grid, ui->cover->size() ) );
ui->cover->setShowText( false );
ui->artistLabel->setContentsMargins( 6, 2, 6, 2 );
ui->artistLabel->setElideMode( Qt::ElideMiddle );
ui->artistLabel->setType( QueryLabel::Artist );
@ -126,7 +124,10 @@ void
ColumnViewPreviewWidget::onCoverUpdated()
{
if ( m_query->track()->cover( QSize( 0, 0 ) ).isNull() )
{
ui->cover->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultTrackImage, TomahawkUtils::Grid, ui->cover->size() ) );
return;
}
ui->cover->setPixmap( TomahawkUtils::createRoundedImage( m_query->track()->cover( ui->cover->size() ), QSize( 0, 0 ) ) );
}