bug(@status-q): only run animations when they are visible to avoid cpu issues (#744)
bug(@status-q): only run animations when they are visible to avoid cpu issues remove prop that doesn't exist
This commit is contained in:
parent
84c529d58d
commit
64d6beb4a0
|
@ -16,6 +16,7 @@ GradientStop {
|
||||||
NumberAnimation on position {
|
NumberAnimation on position {
|
||||||
easing.type: Easing.Linear
|
easing.type: Easing.Linear
|
||||||
loops: Animation.Infinite
|
loops: Animation.Infinite
|
||||||
|
running: visible
|
||||||
from: root.from
|
from: root.from
|
||||||
to: from + 4
|
to: from + 4
|
||||||
duration: 2000
|
duration: 2000
|
||||||
|
|
|
@ -73,6 +73,7 @@ Item {
|
||||||
duration: 150
|
duration: 150
|
||||||
direction: RotationAnimation.Clockwise
|
direction: RotationAnimation.Clockwise
|
||||||
easing.type: Easing.InCubic
|
easing.type: Easing.InCubic
|
||||||
|
running: visible
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Transition {
|
Transition {
|
||||||
|
@ -82,6 +83,7 @@ Item {
|
||||||
duration: 150
|
duration: 150
|
||||||
direction: RotationAnimation.Counterclockwise
|
direction: RotationAnimation.Counterclockwise
|
||||||
easing.type: Easing.OutCubic
|
easing.type: Easing.OutCubic
|
||||||
|
running: visible
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -217,12 +217,12 @@ Rectangle {
|
||||||
Transition {
|
Transition {
|
||||||
from: "COLLAPSED"
|
from: "COLLAPSED"
|
||||||
to: "EXPANDED"
|
to: "EXPANDED"
|
||||||
NumberAnimation { properties: "height"; duration: 200 }
|
NumberAnimation { properties: "height"; duration: 200; running: visible }
|
||||||
},
|
},
|
||||||
Transition {
|
Transition {
|
||||||
from: "EXPANDED"
|
from: "EXPANDED"
|
||||||
to: "COLLAPSED"
|
to: "COLLAPSED"
|
||||||
NumberAnimation { properties: "height"; duration: 200 }
|
NumberAnimation { properties: "height"; duration: 200; running: visible }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ StatusIcon {
|
||||||
from: 0;
|
from: 0;
|
||||||
to: 360;
|
to: 360;
|
||||||
duration: 1200
|
duration: 1200
|
||||||
running: true
|
running: visible
|
||||||
loops: Animation.Infinite
|
loops: Animation.Infinite
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,6 +115,7 @@ Rectangle {
|
||||||
properties: "scale";
|
properties: "scale";
|
||||||
duration: 100;
|
duration: 100;
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
|
running: visible
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -211,8 +211,9 @@ Item {
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
id: blinkingAnimation
|
id: blinkingAnimation
|
||||||
loops: Animation.Infinite
|
loops: Animation.Infinite
|
||||||
NumberAnimation { target: inner; property: "opacity"; to: 0; duration: 800 }
|
running: visible
|
||||||
NumberAnimation { target: inner; property: "opacity"; to: 1; duration: 800 }
|
NumberAnimation { target: inner; property: "opacity"; to: 0; duration: 800; running: visible }
|
||||||
|
NumberAnimation { target: inner; property: "opacity"; to: 1; duration: 800; running: visible }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ Switch {
|
||||||
|
|
||||||
transitions: Transition {
|
transitions: Transition {
|
||||||
reversible: true
|
reversible: true
|
||||||
NumberAnimation { properties: "x"; easing.type: Easing.Linear; duration: 120; }
|
NumberAnimation { properties: "x"; easing.type: Easing.Linear; duration: 120; running: visible }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,6 +108,7 @@ RowLayout {
|
||||||
|
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
|
running: visible
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +156,7 @@ RowLayout {
|
||||||
from: 0
|
from: 0
|
||||||
to: parent.width
|
to: parent.width
|
||||||
duration: 800
|
duration: 800
|
||||||
running: mouseArea.containsPress
|
running: visible && mouseArea.containsPress
|
||||||
|
|
||||||
onStopped: {
|
onStopped: {
|
||||||
if (pressIndicator.width == parent.width) {
|
if (pressIndicator.width == parent.width) {
|
||||||
|
|
Loading…
Reference in New Issue