mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-29 16:50:11 +02:00
Delay AudioControls repaint until we've updated all elements. Looks smoother.
This commit is contained in:
@@ -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( socialActionsLoaded() ), SLOT( onSocialActionsLoaded() ) );
|
||||
|
||||
ui->artistLabel->setResult( result );
|
||||
setUpdatesEnabled( false );
|
||||
ui->trackLabel->setResult( result );
|
||||
ui->artistLabel->setResult( result );
|
||||
|
||||
const QString duration = TomahawkUtils::timeToString( result.data()->track()->duration() );
|
||||
ui->timeLabel->setFixedWidth( ui->timeLabel->fontMetrics().width( QString( duration.length(), QChar( '0' ) ) ) );
|
||||
@@ -370,6 +371,7 @@ AudioControls::onPlaybackLoading( const Tomahawk::result_ptr result )
|
||||
|
||||
setCover();
|
||||
setSocialActions();
|
||||
setUpdatesEnabled( true );
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user