mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-19 04:11:46 +02:00
Do not show tooltips when the relevant widgets are invisible.
This commit is contained in:
@@ -65,13 +65,10 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
ui->albumLabel->setType( QueryLabel::Album );
|
||||
|
||||
ui->timeLabel->setFont( font );
|
||||
ui->timeLabel->setToolTip( tr( "Time Elapsed" ) );
|
||||
ui->timeLeftLabel->setFont( font );
|
||||
ui->timeLeftLabel->setToolTip( tr( "Time Remaining" ) );
|
||||
|
||||
font.setPixelSize( 9 );
|
||||
ui->ownerLabel->setFont( font );
|
||||
ui->ownerLabel->setToolTip( tr( "Music Source" ) );
|
||||
|
||||
ui->prevButton->setPixmap( RESPATH "images/back-rest.png" );
|
||||
ui->prevButton->setPixmap( RESPATH "images/back-pressed.png", QIcon::Off, QIcon::Active );
|
||||
@@ -83,17 +80,13 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
ui->nextButton->setPixmap( RESPATH "images/skip-pressed.png", QIcon::Off, QIcon::Active );
|
||||
ui->shuffleButton->setPixmap( RESPATH "images/shuffle-off-rest.png" );
|
||||
ui->shuffleButton->setPixmap( RESPATH "images/shuffle-off-pressed.png", QIcon::Off, QIcon::Active );
|
||||
ui->shuffleButton->setToolTip( tr( "Shuffle" ) );
|
||||
ui->repeatButton->setPixmap( RESPATH "images/repeat-off-rest.png" );
|
||||
ui->repeatButton->setPixmap( RESPATH "images/repeat-off-pressed.png", QIcon::Off, QIcon::Active );
|
||||
ui->repeatButton->setToolTip( tr( "Repeat" ) );
|
||||
ui->volumeLowButton->setPixmap( RESPATH "images/volume-icon-muted.png" );
|
||||
ui->volumeHighButton->setPixmap( RESPATH "images/volume-icon-full.png" );
|
||||
ui->socialButton->setPixmap( RESPATH "images/share.png" );
|
||||
ui->socialButton->setToolTip( tr( "Share" ) );
|
||||
ui->loveButton->setPixmap( RESPATH "images/not-loved.png" );
|
||||
ui->loveButton->setCheckable( true );
|
||||
ui->loveButton->setToolTip( tr( "Love" ) );
|
||||
|
||||
ui->socialButton->setFixedSize( QSize( 20, 20 ) );
|
||||
ui->loveButton->setFixedSize( QSize( 20, 20 ) );
|
||||
@@ -262,6 +255,14 @@ AudioControls::onPlaybackLoading( const Tomahawk::result_ptr& result )
|
||||
ui->socialButton->setEnabled( true );
|
||||
ui->socialButton->setVisible( true );
|
||||
|
||||
ui->timeLabel->setToolTip( tr( "Time Elapsed" ) );
|
||||
ui->timeLeftLabel->setToolTip( tr( "Time Remaining" ) );
|
||||
ui->ownerLabel->setToolTip( tr( "Music Source" ) );
|
||||
ui->shuffleButton->setToolTip( tr( "Shuffle" ) );
|
||||
ui->repeatButton->setToolTip( tr( "Repeat" ) );
|
||||
ui->socialButton->setToolTip( tr( "Share" ) );
|
||||
ui->loveButton->setToolTip( tr( "Love" ) );
|
||||
|
||||
setCover();
|
||||
setSocialActions();
|
||||
}
|
||||
@@ -367,6 +368,14 @@ AudioControls::onPlaybackStopped()
|
||||
ui->loveButton->setVisible( false );
|
||||
ui->socialButton->setEnabled( false );
|
||||
ui->socialButton->setVisible( false );
|
||||
|
||||
ui->timeLabel->setToolTip( "" );
|
||||
ui->timeLeftLabel->setToolTip( "" );
|
||||
ui->ownerLabel->setToolTip( "" );
|
||||
ui->shuffleButton->setToolTip( "" );
|
||||
ui->repeatButton->setToolTip( "" );
|
||||
ui->socialButton->setToolTip( "" );
|
||||
ui->loveButton->setToolTip( "" );
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user