Skip to content
Snippets Groups Projects
Commit a5a1fe7f authored by Pierre Lamot's avatar Pierre Lamot Committed by Hugo Beauzée-Luyssen
Browse files

qml: don't run seekbar buffering animation when control is hidden

the animation was running and forcing the scenegraph to render even when the
seekbar (in the miniplayer) is hidden, this reduce CPU load when the application
is idle.
parent 01348ae3
No related branches found
No related tags found
Loading
Pipeline #188205 passed with stage
in 18 minutes
......@@ -147,9 +147,20 @@ Slider {
radius: control.barHeight
states: [
State {
name: "hidden"
when: !control.visible
PropertyChanges {
target: bufferRect
width: bufferAnimWidth
visible: false
x: 0
animateLoading: false
}
},
State {
name: "buffering not started"
when: Player.buffering === 0
when: control.visible && Player.buffering === 0
PropertyChanges {
target: bufferRect
width: bufferAnimWidth
......@@ -160,7 +171,7 @@ Slider {
},
State {
name: "time to start playing known"
when: Player.buffering < 1
when: control.visible && Player.buffering < 1
PropertyChanges {
target: bufferRect
width: Player.buffering * parent.width
......@@ -171,7 +182,7 @@ Slider {
},
State {
name: "playing from buffer"
when: Player.buffering === 1
when: control.visible && Player.buffering === 1
PropertyChanges {
target: bufferRect
width: Player.buffering * parent.width
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment