mirror of
https://github.com/tumillanino/miasma-os.git
synced 2026-04-11 07:15:31 +00:00
some more branding
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2014 Marco Martin <mart@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
import QtQuick
|
||||
import org.kde.kirigami 2 as Kirigami
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
color: "black"
|
||||
|
||||
property int stage
|
||||
|
||||
onStageChanged: {
|
||||
if (stage == 2) {
|
||||
introAnimation.running = true;
|
||||
} else if (stage == 5) {
|
||||
introAnimation.target = busyIndicator;
|
||||
introAnimation.from = 1;
|
||||
introAnimation.to = 0;
|
||||
introAnimation.running = true;
|
||||
}
|
||||
}
|
||||
|
||||
width: 1280
|
||||
height: 800
|
||||
|
||||
Component.onCompleted: stage = 2
|
||||
|
||||
Item {
|
||||
id: content
|
||||
anchors.fill: parent
|
||||
opacity: 0
|
||||
|
||||
Image {
|
||||
id: logo
|
||||
//match SDDM/lockscreen avatar positioning
|
||||
readonly property real size: Kirigami.Units.gridUnit * 8
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
asynchronous: true
|
||||
source: "images/miasma-logo.svg"
|
||||
|
||||
sourceSize.width: size
|
||||
sourceSize.height: size
|
||||
}
|
||||
|
||||
// TODO: port to PlasmaComponents3.BusyIndicator
|
||||
Image {
|
||||
id: busyIndicator
|
||||
//in the middle of the remaining space
|
||||
y: parent.height - (parent.height - logo.y) / 2 - height/2
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
asynchronous: true
|
||||
source: "images/busywidget.svgz"
|
||||
sourceSize.height: Kirigami.Units.gridUnit * 2
|
||||
sourceSize.width: Kirigami.Units.gridUnit * 2
|
||||
RotationAnimator on rotation {
|
||||
id: rotationAnimator
|
||||
from: 0
|
||||
to: 360
|
||||
// Not using a standard duration value because we don't want the
|
||||
// animation to spin faster or slower based on the user's animation
|
||||
// scaling preferences; it doesn't make sense in this context
|
||||
duration: 2000
|
||||
loops: Animation.Infinite
|
||||
// Don't want it to animate at all if the user has disabled animations
|
||||
running: Kirigami.Units.longDuration > 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OpacityAnimator {
|
||||
id: introAnimation
|
||||
running: false
|
||||
target: content
|
||||
from: 0
|
||||
to: 1
|
||||
duration: Kirigami.Units.veryLongDuration * 2
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 868 KiB |
Reference in New Issue
Block a user