mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-19 20:34:22 +02:00
* Open the SettingsDialog with the first tab.
* Don't restart overlay animation if it's already in progress / finished.
This commit is contained in:
@@ -19,7 +19,7 @@ OverlayWidget::OverlayWidget( QWidget* parent )
|
|||||||
setAttribute( Qt::WA_TranslucentBackground, true );
|
setAttribute( Qt::WA_TranslucentBackground, true );
|
||||||
|
|
||||||
setOpacity( m_opacity );
|
setOpacity( m_opacity );
|
||||||
|
|
||||||
m_timer.setSingleShot( true );
|
m_timer.setSingleShot( true );
|
||||||
connect( &m_timer, SIGNAL( timeout() ), this, SLOT( hide() ) );
|
connect( &m_timer, SIGNAL( timeout() ), this, SLOT( hide() ) );
|
||||||
}
|
}
|
||||||
@@ -63,10 +63,9 @@ OverlayWidget::show( int timeoutSecs )
|
|||||||
|
|
||||||
QPropertyAnimation* animation = new QPropertyAnimation( this, "opacity" );
|
QPropertyAnimation* animation = new QPropertyAnimation( this, "opacity" );
|
||||||
animation->setDuration( FADING_DURATION );
|
animation->setDuration( FADING_DURATION );
|
||||||
animation->setStartValue( 0.00 );
|
|
||||||
animation->setEndValue( OPACITY );
|
animation->setEndValue( OPACITY );
|
||||||
animation->start();
|
animation->start();
|
||||||
|
|
||||||
if( timeoutSecs > 0 )
|
if( timeoutSecs > 0 )
|
||||||
m_timer.start( timeoutSecs * 1000 );
|
m_timer.start( timeoutSecs * 1000 );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public:
|
|||||||
void setText( const QString& text );
|
void setText( const QString& text );
|
||||||
|
|
||||||
bool shown() const;
|
bool shown() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void show( int timeoutSecs = 0 );
|
void show( int timeoutSecs = 0 );
|
||||||
void hide();
|
void hide();
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabJabber">
|
<widget class="QWidget" name="tabJabber">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
|||||||
Reference in New Issue
Block a user