gate non-essential animations behind reducedMotion config toggle
This commit is contained in:
parent
446edaab9c
commit
ada611d6c5
8 changed files with 43 additions and 12 deletions
|
|
@ -57,7 +57,7 @@ Column {
|
||||||
// Pulse animation while pending
|
// Pulse animation while pending
|
||||||
SequentialAnimation on opacity {
|
SequentialAnimation on opacity {
|
||||||
loops: Animation.Infinite
|
loops: Animation.Infinite
|
||||||
running: entry._pending
|
running: entry._pending && !S.Theme.reducedMotion
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
to: 0.5
|
to: 0.5
|
||||||
duration: 400
|
duration: 400
|
||||||
|
|
|
||||||
|
|
@ -371,7 +371,7 @@ WlSessionLockSurface {
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
id: _heartbeatAnim
|
id: _heartbeatAnim
|
||||||
loops: Animation.Infinite
|
loops: Animation.Infinite
|
||||||
running: root._threatEnabled && root.auth.failCount >= 3 && root.lock.secure
|
running: root._threatEnabled && root.auth.failCount >= 3 && root.lock.secure && !S.Theme.reducedMotion
|
||||||
|
|
||||||
// Systole (sharp spike)
|
// Systole (sharp spike)
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ Item {
|
||||||
|
|
||||||
property real _pulse: 0.08
|
property real _pulse: 0.08
|
||||||
SequentialAnimation on _pulse {
|
SequentialAnimation on _pulse {
|
||||||
running: root._hovered
|
running: root._hovered && !S.Theme.reducedMotion
|
||||||
loops: Animation.Infinite
|
loops: Animation.Infinite
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
to: 0.22
|
to: 0.22
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,12 @@ PanelWindow {
|
||||||
}
|
}
|
||||||
_winVisible = true;
|
_winVisible = true;
|
||||||
hideAnim.stop();
|
hideAnim.stop();
|
||||||
|
if (S.Theme.reducedMotion) {
|
||||||
|
panelContainer.opacity = 1;
|
||||||
|
panelContainer.y = 0;
|
||||||
|
} else {
|
||||||
showAnim.start();
|
showAnim.start();
|
||||||
|
}
|
||||||
_grace = true;
|
_grace = true;
|
||||||
_graceTimer.restart();
|
_graceTimer.restart();
|
||||||
}
|
}
|
||||||
|
|
@ -141,7 +146,13 @@ PanelWindow {
|
||||||
function dismiss() {
|
function dismiss() {
|
||||||
_pinned = false;
|
_pinned = false;
|
||||||
showAnim.stop();
|
showAnim.stop();
|
||||||
|
if (S.Theme.reducedMotion) {
|
||||||
|
_winVisible = false;
|
||||||
|
if (popupMode)
|
||||||
|
dismissed();
|
||||||
|
} else {
|
||||||
hideAnim.start();
|
hideAnim.start();
|
||||||
|
}
|
||||||
_grace = false;
|
_grace = false;
|
||||||
_graceTimer.stop();
|
_graceTimer.stop();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,14 @@ PanelWindow {
|
||||||
_heightScale = 1;
|
_heightScale = 1;
|
||||||
} else {
|
} else {
|
||||||
popupCol._knownIds[modelData.id] = true;
|
popupCol._knownIds[modelData.id] = true;
|
||||||
|
if (S.Theme.reducedMotion) {
|
||||||
|
opacity = 1;
|
||||||
|
x = 0;
|
||||||
|
_heightScale = 1;
|
||||||
|
} else {
|
||||||
slideIn.start();
|
slideIn.start();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
_entered = true;
|
_entered = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -82,7 +88,7 @@ PanelWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on y {
|
Behavior on y {
|
||||||
enabled: popupItem._entered
|
enabled: popupItem._entered && !S.Theme.reducedMotion
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: 200
|
duration: 200
|
||||||
easing.type: Easing.OutCubic
|
easing.type: Easing.OutCubic
|
||||||
|
|
@ -123,8 +129,12 @@ PanelWindow {
|
||||||
popupItem.modelData.beginDismiss();
|
popupItem.modelData.beginDismiss();
|
||||||
_fullDismiss = !!full;
|
_fullDismiss = !!full;
|
||||||
slideIn.stop();
|
slideIn.stop();
|
||||||
|
if (S.Theme.reducedMotion) {
|
||||||
|
full ? S.NotifService.dismiss(modelData.id) : S.NotifService.dismissPopup(modelData.id);
|
||||||
|
} else {
|
||||||
slideOut.start();
|
slideOut.start();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
id: slideOut
|
id: slideOut
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ M.PinnableSection {
|
||||||
Connections {
|
Connections {
|
||||||
target: S.NotifService
|
target: S.NotifService
|
||||||
function onCountChanged() {
|
function onCountChanged() {
|
||||||
if (S.NotifService.count > 0)
|
if (S.NotifService.count > 0 && !S.Theme.reducedMotion)
|
||||||
popAnim.start();
|
popAnim.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
import "../services" as S
|
||||||
|
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
id: root
|
id: root
|
||||||
loops: Animation.Infinite
|
loops: S.Theme.reducedMotion ? 0 : Animation.Infinite
|
||||||
|
|
||||||
property real minOpacity: 0.4
|
property real minOpacity: 0.4
|
||||||
property int halfDuration: 400
|
property int halfDuration: 400
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,21 @@ PanelWindow {
|
||||||
if (_shown) {
|
if (_shown) {
|
||||||
_winVisible = true;
|
_winVisible = true;
|
||||||
hideAnim.stop();
|
hideAnim.stop();
|
||||||
|
if (S.Theme.reducedMotion) {
|
||||||
|
content.opacity = 1;
|
||||||
|
content.y = 0;
|
||||||
|
} else {
|
||||||
showAnim.start();
|
showAnim.start();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
showAnim.stop();
|
showAnim.stop();
|
||||||
|
if (S.Theme.reducedMotion) {
|
||||||
|
_winVisible = false;
|
||||||
|
} else {
|
||||||
hideAnim.start();
|
hideAnim.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
WlrLayershell.layer: WlrLayer.Overlay
|
WlrLayershell.layer: WlrLayer.Overlay
|
||||||
WlrLayershell.exclusiveZone: 0
|
WlrLayershell.exclusiveZone: 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue