2020-09-23 19:57:54 -04:00
|
|
|
// Copyright Mirage authors & contributors <https://github.com/mirukana/mirage>
|
2019-12-19 07:46:16 -04:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
2019-07-13 05:39:01 -04:00
|
|
|
import QtQuick 2.12
|
2019-07-06 17:42:04 -04:00
|
|
|
|
|
|
|
NumberAnimation {
|
2019-08-17 13:35:43 -04:00
|
|
|
property real factor: 1.0
|
2020-07-19 00:37:26 -04:00
|
|
|
property real overshoot: 0.0
|
2019-08-17 13:01:43 -04:00
|
|
|
|
2020-07-12 00:25:57 -04:00
|
|
|
|
2020-07-19 00:37:26 -04: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-17 13:01:43 -04:00
|
|
|
easing.overshoot: overshoot
|
2019-07-06 17:42:04 -04:00
|
|
|
}
|