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:
parent
a5a8251a7f
commit
aed6e2895b
@ -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();
|
||||
|
@ -78,6 +78,13 @@ OverlayWidget::hide()
|
||||
animation->start();
|
||||
}
|
||||
|
||||
bool
|
||||
OverlayWidget::shown() const
|
||||
{
|
||||
return m_opacity == OPACITY;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
OverlayWidget::paintEvent( QPaintEvent* event )
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user