diff --git a/modules/gui/qt4/util/input_slider.cpp b/modules/gui/qt4/util/input_slider.cpp index 7935982080385b082b48ee3efe007c97a04da774..2edb423df96ccd7b3b873d67143fb7aef072b9d0 100644 --- a/modules/gui/qt4/util/input_slider.cpp +++ b/modules/gui/qt4/util/input_slider.cpp @@ -153,10 +153,15 @@ SeekSlider::SeekSlider( Qt::Orientation q, QWidget *_parent, bool _static ) hideHandleTimer->setSingleShot( true ); hideHandleTimer->setInterval( FADEOUTDELAY ); + startAnimLoadingTimer = new QTimer( this ); + startAnimLoadingTimer->setSingleShot( true ); + startAnimLoadingTimer->setInterval( 500 ); + CONNECT( MainInputManager::getInstance(), inputChanged( bool ), this , inputUpdated( bool ) ); CONNECT( this, sliderMoved( int ), this, startSeekTimer() ); CONNECT( seekLimitTimer, timeout(), this, updatePos() ); CONNECT( hideHandleTimer, timeout(), this, hideHandle() ); + CONNECT( startAnimLoadingTimer, timeout(), this, startAnimLoading() ); mTimeTooltip->installEventFilter( this ); } @@ -232,6 +237,7 @@ void SeekSlider::updateBuffering( float f_buffering_ ) f_buffering = f_buffering_; if ( f_buffering > 0.0 || isEnabled() ) { animLoading->stop(); + startAnimLoadingTimer->stop(); mLoading = 0.0; } repaint(); @@ -241,11 +247,12 @@ void SeekSlider::inputUpdated( bool b_has_input ) { if ( b_has_input == false ) { animLoading->stop(); + startAnimLoadingTimer->stop(); mLoading = 0.0; repaint(); } else if ( f_buffering == 0.0 && !isEnabled() ) - animLoading->start(); + startAnimLoadingTimer->start(); } void SeekSlider::processReleasedButton() @@ -530,6 +537,10 @@ void SeekSlider::hideHandle() animHandle->start(); } +void SeekSlider::startAnimLoading() +{ + animLoading->start(); +} /* This work is derived from Amarok's work under GPLv2+ - Mark Kretschmann diff --git a/modules/gui/qt4/util/input_slider.hpp b/modules/gui/qt4/util/input_slider.hpp index 5e4b20368e293be9384a7e2059117fa246f6ae64..50d8586a17b646bc7e845a32f618b43fcc21d224 100644 --- a/modules/gui/qt4/util/input_slider.hpp +++ b/modules/gui/qt4/util/input_slider.hpp @@ -110,6 +110,7 @@ private: QPropertyAnimation *animHandle; QSequentialAnimationGroup *animLoading; QTimer *hideHandleTimer; + QTimer *startAnimLoadingTimer; public slots: void setPosition( float, int64_t, int ); @@ -121,6 +122,7 @@ private slots: void startSeekTimer(); void updatePos(); void inputUpdated( bool ); + void startAnimLoading(); signals: void sliderDragged( float );