1
0
Fork 0
mirror of https://github.com/vinceliuice/MacSequoia-kde.git synced 2024-11-24 23:00:10 +00:00
MacSequoia-kde/sddm/MacSequoia-5.0/components/animation/RejectPasswordAnimation.qml
vinceliuice 0f831a3dab Upload
2024-06-30 12:16:38 +08:00

42 lines
968 B
QML

/*
SPDX-FileCopyrightText: 2022 ivan (@ratijas) tkachenko <me@ratijas.tk>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
import QtQuick 2.15
import QtQml 2.15
QtObject {
id: root
property Item target
readonly property Animation __animation: RejectPasswordPathAnimation {
id: animation
target: Item { id: fakeTarget }
}
property Binding __bindEnabled: Binding {
target: root.target
property: "enabled"
value: false
when: animation.running
restoreMode: Binding.RestoreBindingOrValue
}
// real target is getting a Translate object which pulls coordinates from
// a fake Item object
property Binding __bindTransform: Binding {
target: root.target
property: "transform"
value: Translate {
x: fakeTarget.x
}
restoreMode: Binding.RestoreBindingOrValue
}
function start() {
animation.start();
}
}