matrixion/resources/qml/ui/animations/BlinkAnimation.qml

32 lines
601 B
QML
Raw Normal View History

// SPDX-FileCopyrightText: Nheko Contributors
2021-07-09 05:39:27 +03:00
//
// SPDX-License-Identifier: GPL-3.0-or-later
2023-06-02 01:43:38 +03:00
import QtQuick
2021-07-09 05:39:27 +03:00
SequentialAnimation {
property alias target: numberAnimation.target
property alias glowDuration: numberAnimation.duration
2021-07-10 18:21:15 +03:00
property int pauseDuration: 150
property double offset: 0
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
2021-07-10 18:21:15 +03:00
2021-07-09 05:39:27 +03:00
property: "opacity"
from: 0
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
}