1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-30 01:00:13 +02:00

Delay AudioControls repaint until we've updated all elements. Looks smoother.

This commit is contained in:
Christian Muehlhaeuser
2015-12-05 09:38:26 +01:00
parent 73a1160ce3
commit de78768be6

View File

@@ -310,8 +310,9 @@ AudioControls::onPlaybackLoading( const Tomahawk::result_ptr result )
connect( m_currentTrack->track().data(), SIGNAL( coverChanged() ), SLOT( onCoverUpdated() ) ); connect( m_currentTrack->track().data(), SIGNAL( coverChanged() ), SLOT( onCoverUpdated() ) );
connect( m_currentTrack->track().data(), SIGNAL( socialActionsLoaded() ), SLOT( onSocialActionsLoaded() ) ); connect( m_currentTrack->track().data(), SIGNAL( socialActionsLoaded() ), SLOT( onSocialActionsLoaded() ) );
ui->artistLabel->setResult( result ); setUpdatesEnabled( false );
ui->trackLabel->setResult( result ); ui->trackLabel->setResult( result );
ui->artistLabel->setResult( result );
const QString duration = TomahawkUtils::timeToString( result.data()->track()->duration() ); const QString duration = TomahawkUtils::timeToString( result.data()->track()->duration() );
ui->timeLabel->setFixedWidth( ui->timeLabel->fontMetrics().width( QString( duration.length(), QChar( '0' ) ) ) ); ui->timeLabel->setFixedWidth( ui->timeLabel->fontMetrics().width( QString( duration.length(), QChar( '0' ) ) ) );
@@ -370,6 +371,7 @@ AudioControls::onPlaybackLoading( const Tomahawk::result_ptr result )
setCover(); setCover();
setSocialActions(); setSocialActions();
setUpdatesEnabled( true );
} }