2024-10-28 11:23:46 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
|
|
|
SequentialAnimation {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property var target: null
|
2024-11-18 13:20:10 +00:00
|
|
|
property string targetProperty: "color"
|
2024-10-28 11:23:46 +00:00
|
|
|
property color fromColor: Theme.palette.directColor1
|
2024-11-07 09:10:10 +00:00
|
|
|
property color toColor: Theme.palette.getColor(fromColor, 0.1)
|
2024-10-28 11:23:46 +00:00
|
|
|
property int duration: 500 // in milliseconds
|
|
|
|
|
|
|
|
loops: 3
|
|
|
|
|
|
|
|
ColorAnimation {
|
|
|
|
target: root.target
|
2024-11-18 13:20:10 +00:00
|
|
|
property: root.targetProperty
|
2024-10-28 11:23:46 +00:00
|
|
|
from: root.fromColor
|
|
|
|
to: root.toColor
|
|
|
|
duration: root.duration
|
|
|
|
}
|
|
|
|
|
|
|
|
ColorAnimation {
|
|
|
|
target: root.target
|
2024-11-18 13:20:10 +00:00
|
|
|
property: root.targetProperty
|
2024-10-28 11:23:46 +00:00
|
|
|
from: root.toColor
|
|
|
|
to: root.fromColor
|
|
|
|
duration: root.duration
|
|
|
|
}
|
|
|
|
}
|