From 68d7c11c5809aa28436f068f0c0415ed04da13a0 Mon Sep 17 00:00:00 2001 From: miruka Date: Sat, 30 Nov 2019 11:45:24 -0400 Subject: [PATCH] Add HX/YAnimator, used instead of HNumberAnimation --- src/qml/Base/HXAnimator.qml | 7 +++++++ src/qml/Base/HYAnimator.qml | 7 +++++++ src/qml/Chat/Timeline/EventDelegate.qml | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/qml/Base/HXAnimator.qml create mode 100644 src/qml/Base/HYAnimator.qml diff --git a/src/qml/Base/HXAnimator.qml b/src/qml/Base/HXAnimator.qml new file mode 100644 index 00000000..e1c5a861 --- /dev/null +++ b/src/qml/Base/HXAnimator.qml @@ -0,0 +1,7 @@ +import QtQuick 2.12 + +XAnimator { + duration: theme.animationDuration * factor + + property real factor: 1.0 +} diff --git a/src/qml/Base/HYAnimator.qml b/src/qml/Base/HYAnimator.qml new file mode 100644 index 00000000..d59c00a1 --- /dev/null +++ b/src/qml/Base/HYAnimator.qml @@ -0,0 +1,7 @@ +import QtQuick 2.12 + +YAnimator { + duration: theme.animationDuration * factor + + property real factor: 1.0 +} diff --git a/src/qml/Chat/Timeline/EventDelegate.qml b/src/qml/Chat/Timeline/EventDelegate.qml index 02733ceb..379afa69 100644 --- a/src/qml/Chat/Timeline/EventDelegate.qml +++ b/src/qml/Chat/Timeline/EventDelegate.qml @@ -99,7 +99,7 @@ Column { id: eventContent width: parent.width - Behavior on x { HNumberAnimation {} } + Behavior on x { HXAnimator {} } }