shift-shell/lookandfeel/contents/splash/Splash.qml

98 lines
No EOL
2.9 KiB
QML

/*
SPDX-FileCopyrightText: 2026 Marco Allegretti
SPDX-License-Identifier: EUPL-1.2
*/
import QtQuick
import org.kde.kirigami as Kirigami
Rectangle {
id: root
color: "#0e0f16"
property int stage
readonly property bool busy: stage > 1 && stage < 6
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 {
duration: Kirigami.Units.veryLongDuration
easing.type: Easing.InOutQuad
}
}
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 {
duration: Kirigami.Units.longDuration
easing.type: Easing.InOutQuad
}
}
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
duration: 1400
loops: Animation.Infinite
running: root.busy && Kirigami.Units.longDuration > 1
}
}
}
}