2020-09-24 09:57:54 +10:00
|
|
|
// Copyright Mirage authors & contributors <https://github.com/mirukana/mirage>
|
2019-12-19 22:46:16 +11:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
2019-07-13 19:39:01 +10:00
|
|
|
import QtQuick 2.12
|
2019-07-07 07:42:04 +10:00
|
|
|
|
|
|
|
NumberAnimation {
|
2019-08-18 03:35:43 +10:00
|
|
|
property real factor: 1.0
|
2020-07-19 14:37:26 +10:00
|
|
|
property real overshoot: 0.0
|
2019-08-18 03:01:43 +10:00
|
|
|
|
2020-07-12 14:25:57 +10:00
|
|
|
|
2020-07-19 14:37:26 +10:00
|
|
|
duration:
|
|
|
|
theme.animationDuration *
|
|
|
|
Math.max((1 + Math.abs(overshoot)) / 1.7, 1.0) * factor
|
|
|
|
|
|
|
|
easing.type:
|
|
|
|
overshoot > 0 ? Easing.OutBack :
|
|
|
|
overshoot < 0 ? Easing.InBack :
|
|
|
|
Easing.Linear
|
|
|
|
|
2019-08-18 03:01:43 +10:00
|
|
|
easing.overshoot: overshoot
|
2019-07-07 07:42:04 +10:00
|
|
|
}
|