1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-13 20:41:58 +02:00

Don't re-fade in text in the overlay that is already visible

This commit is contained in:
Leo Franchi 2011-01-28 22:08:32 -05:00
parent a5a8251a7f
commit aed6e2895b
3 changed files with 10 additions and 1 deletions

View File

@ -68,7 +68,8 @@ DynamicView::onTrackCountChanged( unsigned int tracks )
overlay()->setText( tr( "Add some filters above, and press Start to begin listening to this custom station!" ) );
else
overlay()->setText( tr( "Add some filters above, and press Generate to get started!" ) );
overlay()->show();
if( !overlay()->shown() )
overlay()->show();
}
else
overlay()->hide();

View File

@ -78,6 +78,13 @@ OverlayWidget::hide()
animation->start();
}
bool
OverlayWidget::shown() const
{
return m_opacity == OPACITY;
}
void
OverlayWidget::paintEvent( QPaintEvent* event )

View File

@ -22,6 +22,7 @@ public:
QString text() const { return m_text; }
void setText( const QString& text );
bool shown() const;
public slots:
void show( int timeoutSecs = 0 );
void hide();