Commit 9d679e90 authored by Jonathan Calmels's avatar Jonathan Calmels Committed by Jean-Baptiste Kempf

Qt: buffering slider option should be 0 when the cache is empty

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 8d6cfafb
...@@ -212,7 +212,7 @@ void InputManager::delInput() ...@@ -212,7 +212,7 @@ void InputManager::delInput()
emit encryptionChanged( false ); emit encryptionChanged( false );
emit recordingStateChanged( false ); emit recordingStateChanged( false );
emit cachingChanged( 1 ); emit cachingChanged( 0.0 );
} }
/* Convert the event from the callbacks in actions */ /* Convert the event from the callbacks in actions */
......
...@@ -128,7 +128,7 @@ void SeekStyle::drawComplexControl( ComplexControl cc, const QStyleOptionComplex ...@@ -128,7 +128,7 @@ void SeekStyle::drawComplexControl( ComplexControl cc, const QStyleOptionComplex
} }
/* draw buffering overlay */ /* draw buffering overlay */
if ( slideroptions->buffering < 1.0 ) if ( slideroptions->buffering > 0.0 && slideroptions->buffering < 1.0 )
{ {
QRect innerRect = groove.adjusted( 1, 1, QRect innerRect = groove.adjusted( 1, 1,
groove.width() * ( -1.0 + slideroptions->buffering ) - 1, 0 ); groove.width() * ( -1.0 + slideroptions->buffering ) - 1, 0 );
......
...@@ -60,7 +60,7 @@ SeekSlider::SeekSlider( Qt::Orientation q, QWidget *_parent, bool _static ) ...@@ -60,7 +60,7 @@ SeekSlider::SeekSlider( Qt::Orientation q, QWidget *_parent, bool _static )
{ {
isSliding = false; isSliding = false;
isJumping = false; isJumping = false;
f_buffering = 1.0; f_buffering = 0.0;
mHandleOpacity = 1.0; mHandleOpacity = 1.0;
chapters = NULL; chapters = NULL;
mHandleLength = -1; mHandleLength = -1;
...@@ -393,7 +393,7 @@ void SeekSlider::paintEvent( QPaintEvent *ev ) ...@@ -393,7 +393,7 @@ void SeekSlider::paintEvent( QPaintEvent *ev )
if ( QTime::currentTime() > bufferingStart.addSecs( 1 ) ) if ( QTime::currentTime() > bufferingStart.addSecs( 1 ) )
option.buffering = f_buffering; option.buffering = f_buffering;
else else
option.buffering = 1.0; option.buffering = 0.0;
option.length = inputLength; option.length = inputLength;
option.animate = ( animHandle->state() == QAbstractAnimation::Running option.animate = ( animHandle->state() == QAbstractAnimation::Running
|| hideHandleTimer->isActive() ); || hideHandleTimer->isActive() );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment