2026-05-19 07:18:32 +00:00
|
|
|
/*
|
|
|
|
|
SPDX-FileCopyrightText: 2026 Marco Allegretti
|
|
|
|
|
|
|
|
|
|
SPDX-License-Identifier: EUPL-1.2
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import QtQuick
|
|
|
|
|
import org.kde.kirigami as Kirigami
|
2026-05-21 09:14:42 +00:00
|
|
|
import org.kde.plasma.private.mobileshell as MobileShell
|
2026-05-19 07:18:32 +00:00
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
id: root
|
|
|
|
|
|
|
|
|
|
color: "#0e0f16"
|
|
|
|
|
|
|
|
|
|
property int stage
|
|
|
|
|
|
|
|
|
|
readonly property bool busy: stage > 1 && stage < 6
|
2026-05-21 09:14:42 +00:00
|
|
|
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
|
|
|
readonly property int veryLongAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsSlow)
|
|
|
|
|
readonly property int spinnerAnimationDuration: Math.round(MobileShell.Motion.duration(MobileShell.Motion.EffectsSlow) * 3.5)
|
2026-05-19 07:18:32 +00:00
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
id: content
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
width: Math.min(parent.width, Kirigami.Units.gridUnit * 24)
|
|
|
|
|
height: Kirigami.Units.gridUnit * 12
|
|
|
|
|
opacity: root.stage > 1 ? 1 : 0
|
|
|
|
|
|
|
|
|
|
Behavior on opacity {
|
|
|
|
|
OpacityAnimator {
|
2026-05-21 09:14:42 +00:00
|
|
|
duration: root.veryLongAnimationDuration
|
|
|
|
|
easing.type: MobileShell.Motion.easing(MobileShell.Motion.EffectsSlow)
|
2026-05-19 07:18:32 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Text {
|
|
|
|
|
id: wordmark
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
text: "SHIFT"
|
|
|
|
|
color: "#fcfcfc"
|
|
|
|
|
font.family: "Atkinson Hyperlegible Next"
|
|
|
|
|
font.pixelSize: Math.round(Kirigami.Units.gridUnit * 3.2)
|
|
|
|
|
font.weight: Font.DemiBold
|
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
width: Math.round(Kirigami.Units.gridUnit * 5)
|
|
|
|
|
height: Math.max(2, Math.round(Kirigami.Units.devicePixelRatio * 2))
|
|
|
|
|
radius: height / 2
|
|
|
|
|
color: "#2eb8a8"
|
|
|
|
|
anchors.top: wordmark.bottom
|
|
|
|
|
anchors.topMargin: Kirigami.Units.largeSpacing
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
id: busyIndicator
|
|
|
|
|
width: Kirigami.Units.gridUnit * 1.6
|
|
|
|
|
height: width
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
anchors.top: wordmark.bottom
|
|
|
|
|
anchors.topMargin: Kirigami.Units.gridUnit * 2.2
|
|
|
|
|
opacity: root.busy ? 1 : 0
|
|
|
|
|
|
|
|
|
|
Behavior on opacity {
|
|
|
|
|
OpacityAnimator {
|
2026-05-21 09:14:42 +00:00
|
|
|
duration: root.longAnimationDuration
|
|
|
|
|
easing.type: MobileShell.Motion.easing(MobileShell.Motion.EffectsDefault)
|
2026-05-19 07:18:32 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
radius: width / 2
|
|
|
|
|
color: "transparent"
|
|
|
|
|
border.width: Math.max(2, Math.round(Kirigami.Units.devicePixelRatio * 2))
|
|
|
|
|
border.color: "#2eb8a8"
|
|
|
|
|
opacity: 0.28
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
width: parent.width
|
|
|
|
|
height: Math.max(2, Math.round(Kirigami.Units.devicePixelRatio * 2))
|
|
|
|
|
radius: height / 2
|
|
|
|
|
color: "#2eb8a8"
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RotationAnimator on rotation {
|
|
|
|
|
from: 0
|
|
|
|
|
to: 360
|
2026-05-21 09:14:42 +00:00
|
|
|
duration: root.spinnerAnimationDuration
|
2026-05-19 07:18:32 +00:00
|
|
|
loops: Animation.Infinite
|
2026-05-21 09:14:42 +00:00
|
|
|
running: root.busy && MobileShell.Motion.enabled
|
2026-05-19 07:18:32 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|