From 66a2f82b2c7842cfebc50c723aac79efb0a663a6 Mon Sep 17 00:00:00 2001 From: laaria Date: Mon, 1 Jul 2024 10:51:46 +0000 Subject: [PATCH] Upload files to "contents/splash" --- contents/splash/Splash.qml | 87 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 contents/splash/Splash.qml diff --git a/contents/splash/Splash.qml b/contents/splash/Splash.qml new file mode 100644 index 0000000..2feec90 --- /dev/null +++ b/contents/splash/Splash.qml @@ -0,0 +1,87 @@ +import QtQuick 2.5 +import QtQuick.Window 2.2 + +Rectangle { + id: root + color: "#000000" + + property int stage + + onStageChanged: { + if (stage == 1) { + introAnimation.running = true; + } else if (stage == 5) { + introAnimation.target = busyIndicator; + introAnimation.from = 1; + introAnimation.to = 0; + introAnimation.running = true; + } + } + + Item { + id: content + anchors.fill: parent + opacity: 0 + TextMetrics { + id: units + text: "M" + property int gridUnit: boundingRect.height + property int largeSpacing: units.gridUnit + property int smallSpacing: Math.max(2, gridUnit/4) + } + + Rectangle { + + property int sizeAnim: 200 + + id: imageSource + width: sizeAnim + height: sizeAnim + color: "transparent" + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + clip: true; + + AnimatedImage { + id: face + source: "images/plasma_d.gif" + paused: false + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + width: imageSource.sizeAnim - 32 + height: imageSource.sizeAnim - 20 + smooth: true + visible: true + } + } + + Image { + id: busyIndicator + //in the middle of the remaining space + y: parent.height - 150 + anchors.horizontalCenter: parent.horizontalCenter + anchors.margins: units.gridUnit + source: "images/busywidget.svgz" + sourceSize.height: units.gridUnit * 2 + sourceSize.width: units.gridUnit * 2 + RotationAnimator on rotation { + id: rotationAnimator + from: 0 + to: 360 + duration: 1500 + loops: Animation.Infinite + } + } + + } + + OpacityAnimator { + id: introAnimation + running: false + target: content + from: 0 + to: 1 + duration: 1000 + easing.type: Easing.InOutQuad + } +}