tie transitions to reduced motion setting

This commit is contained in:
Karthik Nishanth 2024-06-23 18:24:39 -07:00
parent 3b339a8007
commit f1ce494b74
12 changed files with 19 additions and 0 deletions

View file

@ -79,6 +79,7 @@ ColumnLayout {
from: "" from: ""
reversible: true reversible: true
to: "focused" to: "focused"
enabled: !Settings.reducedMotion
NumberAnimation { NumberAnimation {
alwaysRunToEnd: true alwaysRunToEnd: true
@ -164,6 +165,7 @@ ColumnLayout {
from: "" from: ""
reversible: true reversible: true
to: "focused" to: "focused"
enabled: !Settings.reducedMotion
NumberAnimation { NumberAnimation {
alwaysRunToEnd: true alwaysRunToEnd: true

View file

@ -335,6 +335,7 @@ Rectangle {
y: messageInput.positionToRectangle(messageInput.completerTriggeredAt).y - height y: messageInput.positionToRectangle(messageInput.completerTriggeredAt).y - height
enter: Transition { enter: Transition {
enabled: !Settings.reducedMotion
NumberAnimation { NumberAnimation {
duration: 100 duration: 100
from: 0 from: 0
@ -343,6 +344,7 @@ Rectangle {
} }
} }
exit: Transition { exit: Transition {
enabled: !Settings.reducedMotion
NumberAnimation { NumberAnimation {
duration: 100 duration: 100
from: 1 from: 1

View file

@ -667,6 +667,7 @@ Item {
from: "" from: ""
reversible: true reversible: true
to: "shown" to: "shown"
enabled: !Settings.reducedMotion
SequentialAnimation { SequentialAnimation {
PauseAnimation { PauseAnimation {

View file

@ -68,6 +68,7 @@ Item {
from: "Invisible" from: "Invisible"
reversible: true reversible: true
to: "Visible" to: "Visible"
enabled: !Settings.reducedMotion
SequentialAnimation { SequentialAnimation {
NumberAnimation { NumberAnimation {

View file

@ -432,6 +432,7 @@ Pane {
Transition { Transition {
id: reducedMotionTransitionExit id: reducedMotionTransitionExit
enabled: !Settings.reducedMotion
PropertyAnimation { PropertyAnimation {
duration: 200 duration: 200
@ -442,6 +443,7 @@ Pane {
} }
Transition { Transition {
id: reducedMotionTransitionEnter id: reducedMotionTransitionEnter
enabled: !Settings.reducedMotion
SequentialAnimation { SequentialAnimation {
PropertyAction { PropertyAction {

View file

@ -107,6 +107,7 @@ TimelineEvent {
transitions: Transition { transitions: Transition {
from: "" from: ""
to: "revealed" to: "revealed"
enabled: !Settings.reducedMotion
SequentialAnimation { SequentialAnimation {
PropertyAnimation { PropertyAnimation {

View file

@ -107,6 +107,7 @@ TimelineEvent {
transitions: Transition { transitions: Transition {
from: "" from: ""
to: "revealed" to: "revealed"
enabled: !Settings.reducedMotion
SequentialAnimation { SequentialAnimation {
PropertyAnimation { PropertyAnimation {

View file

@ -5,6 +5,7 @@
import QtQuick 2.5 import QtQuick 2.5
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import im.nheko 1.0
Switch { Switch {
id: toggleButton id: toggleButton
@ -66,6 +67,7 @@ Switch {
Transition { Transition {
reversible: true reversible: true
to: "off" to: "off"
enabled: !Settings.reducedMotion
ParallelAnimation { ParallelAnimation {
NumberAnimation { NumberAnimation {

View file

@ -72,6 +72,7 @@ AbstractButton {
from: "ImageVisible" from: "ImageVisible"
to: "BlurhashVisible" to: "BlurhashVisible"
reversible: true reversible: true
enabled: !Settings.reducedMotion
SequentialAnimation { SequentialAnimation {
PropertyAction { PropertyAction {

View file

@ -59,6 +59,7 @@ Item {
Transition { Transition {
from: "NORMAL" from: "NORMAL"
to: "ACTIVE" to: "ACTIVE"
enabled: !Settings.reducedMotion
SequentialAnimation { SequentialAnimation {
//PropertyAction { target: circle; property: "centerX"; value: ph.point.position.x } //PropertyAction { target: circle; property: "centerX"; value: ph.point.position.x }
@ -87,6 +88,7 @@ Item {
Transition { Transition {
from: "ACTIVE" from: "ACTIVE"
to: "NORMAL" to: "NORMAL"
enabled: !Settings.reducedMotion
SequentialAnimation { SequentialAnimation {
ParallelAnimation { ParallelAnimation {

View file

@ -61,6 +61,7 @@ Popup {
} }
enter: Transition { enter: Transition {
enabled: !Settings.reducedMotion
NumberAnimation { NumberAnimation {
target: snackbar target: snackbar
property: "opacity" property: "opacity"
@ -79,6 +80,7 @@ Popup {
} }
} }
exit: Transition { exit: Transition {
enabled: !Settings.reducedMotion
NumberAnimation { NumberAnimation {
target: snackbar target: snackbar
property: "opacity" property: "opacity"

View file

@ -146,6 +146,7 @@ Rectangle {
Transition { Transition {
from: "" from: ""
to: "shown" to: "shown"
enabled: !Settings.reducedMotion
SequentialAnimation { SequentialAnimation {
PauseAnimation { PauseAnimation {
@ -163,6 +164,7 @@ Rectangle {
Transition { Transition {
from: "shown" from: "shown"
to: "" to: ""
enabled: !Settings.reducedMotion
SequentialAnimation { SequentialAnimation {
PauseAnimation { PauseAnimation {