mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-21 18:50:47 +03:00
tie transitions to reduced motion setting
This commit is contained in:
parent
3b339a8007
commit
f1ce494b74
12 changed files with 19 additions and 0 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -667,6 +667,7 @@ Item {
|
||||||
from: ""
|
from: ""
|
||||||
reversible: true
|
reversible: true
|
||||||
to: "shown"
|
to: "shown"
|
||||||
|
enabled: !Settings.reducedMotion
|
||||||
|
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
PauseAnimation {
|
PauseAnimation {
|
||||||
|
|
|
@ -68,6 +68,7 @@ Item {
|
||||||
from: "Invisible"
|
from: "Invisible"
|
||||||
reversible: true
|
reversible: true
|
||||||
to: "Visible"
|
to: "Visible"
|
||||||
|
enabled: !Settings.reducedMotion
|
||||||
|
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -107,6 +107,7 @@ TimelineEvent {
|
||||||
transitions: Transition {
|
transitions: Transition {
|
||||||
from: ""
|
from: ""
|
||||||
to: "revealed"
|
to: "revealed"
|
||||||
|
enabled: !Settings.reducedMotion
|
||||||
|
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
PropertyAnimation {
|
PropertyAnimation {
|
||||||
|
|
|
@ -107,6 +107,7 @@ TimelineEvent {
|
||||||
transitions: Transition {
|
transitions: Transition {
|
||||||
from: ""
|
from: ""
|
||||||
to: "revealed"
|
to: "revealed"
|
||||||
|
enabled: !Settings.reducedMotion
|
||||||
|
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
PropertyAnimation {
|
PropertyAnimation {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -72,6 +72,7 @@ AbstractButton {
|
||||||
from: "ImageVisible"
|
from: "ImageVisible"
|
||||||
to: "BlurhashVisible"
|
to: "BlurhashVisible"
|
||||||
reversible: true
|
reversible: true
|
||||||
|
enabled: !Settings.reducedMotion
|
||||||
|
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
PropertyAction {
|
PropertyAction {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue