perf/feat: gate cpu behaviors on _showPanel; add reducedMotion theme setting for ambient animations
This commit is contained in:
parent
937ae5af2e
commit
c96b023fbe
4 changed files with 11 additions and 2 deletions
|
|
@ -54,6 +54,7 @@ PanelWindow {
|
|||
text: ":"
|
||||
color: colon._colors[colon._colorIdx % colon._colors.length]
|
||||
Behavior on color {
|
||||
enabled: !M.Theme.reducedMotion
|
||||
ColorAnimation {
|
||||
duration: 800
|
||||
}
|
||||
|
|
@ -110,6 +111,7 @@ PanelWindow {
|
|||
readonly property var _colors: [M.Theme.base08, M.Theme.base09, M.Theme.base0A, M.Theme.base0B, M.Theme.base0C, M.Theme.base0D, M.Theme.base0E, M.Theme.base05]
|
||||
color: _colors[_colorIdx % _colors.length]
|
||||
Behavior on color {
|
||||
enabled: !M.Theme.reducedMotion
|
||||
ColorAnimation {
|
||||
duration: 800
|
||||
}
|
||||
|
|
@ -117,7 +119,7 @@ PanelWindow {
|
|||
|
||||
SequentialAnimation {
|
||||
loops: Animation.Infinite
|
||||
running: true
|
||||
running: !M.Theme.reducedMotion
|
||||
NumberAnimation {
|
||||
target: colon
|
||||
property: "opacity"
|
||||
|
|
@ -187,6 +189,7 @@ PanelWindow {
|
|||
height: parent.height
|
||||
color: colon._colors[colon._colorIdx % colon._colors.length]
|
||||
Behavior on color {
|
||||
enabled: !M.Theme.reducedMotion
|
||||
ColorAnimation {
|
||||
duration: 800
|
||||
}
|
||||
|
|
@ -195,6 +198,7 @@ PanelWindow {
|
|||
opacity: 0.6
|
||||
|
||||
Behavior on width {
|
||||
enabled: !M.Theme.reducedMotion
|
||||
NumberAnimation {
|
||||
duration: 300
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue