matrixion/qml/ui/animations/BlinkAnimation.qml

27 lines
654 B
QML
Raw Normal View History

2021-07-09 05:39:27 +03:00
// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
2021-07-09 05:39:27 +03:00
// SPDX-License-Identifier: GPL-3.0-or-later
2021-07-10 18:21:15 +03:00
import QtQuick 2.12
2021-07-09 05:39:27 +03:00
SequentialAnimation {
property alias glowDuration: numberAnimation.duration
2021-07-10 18:21:15 +03:00
property double offset: 0
2022-04-16 03:13:01 +03:00
property int pauseDuration: 150
property alias target: numberAnimation.target
2021-07-09 05:39:27 +03:00
loops: Animation.Infinite
2021-07-10 18:21:15 +03:00
PauseAnimation {
duration: pauseDuration * offset
}
2021-07-09 05:39:27 +03:00
NumberAnimation {
id: numberAnimation
from: 0
2022-04-16 03:13:01 +03:00
property: "opacity"
2021-07-09 05:39:27 +03:00
to: 1
}
PauseAnimation {
2021-07-10 18:21:15 +03:00
duration: pauseDuration * (1 - offset)
2021-07-09 05:39:27 +03:00
}
2021-07-10 18:21:15 +03:00
}