Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
fdd60326
Commit
fdd60326
authored
Dec 07, 2015
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qt4: input_slider: Delay the loading slider animation start
In order to avoid flickering on local content
parent
98a4529f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
modules/gui/qt4/util/input_slider.cpp
modules/gui/qt4/util/input_slider.cpp
+12
-1
modules/gui/qt4/util/input_slider.hpp
modules/gui/qt4/util/input_slider.hpp
+2
-0
No files found.
modules/gui/qt4/util/input_slider.cpp
View file @
fdd60326
...
...
@@ -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
...
...
modules/gui/qt4/util/input_slider.hpp
View file @
fdd60326
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment