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:
@@ -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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user