Commit 6db2dec1 authored by Marco Martin's avatar Marco Martin
Browse files

prettier startup feedback

parent fd53315f
......@@ -25,15 +25,16 @@ import QtGraphicalEffects 1.12
import org.kde.kirigami 2.13 as Kirigami
import org.kde.plasma.private.nanoshell 2.0 as NanoShell
pragma Singleton
Window {
NanoShell.FullScreenOverlay {
id: window
property alias backgroundColor: background.color
Kirigami.ImageColors {
id: colorGenerator
source: icon.source
}
function open(splashIcon, title, x, y, sourceIconSize, color) {
......@@ -43,6 +44,7 @@ Window {
background.y = -window.height/2 + y
window.title = title;
icon.source = splashIcon;
colorGenerator.source = splashIcon;
if (color !== undefined) {
// Break binding to use custom color
......@@ -93,15 +95,24 @@ Window {
source: icon
}
}
Rectangle {
id: background
width: window.width
height: window.height
radius: Kirigami.Units.gridUnit
color: colorGenerator.dominant
state: "closed"
Rectangle {
id: fill
z: -1
anchors.fill: parent
opacity: 0
color: Kirigami.Theme.backgroundColor
}
states: [
State {
name: "closed"
......@@ -109,6 +120,10 @@ Window {
target: window
visible: false
}
PropertyChanges {
target: fill
opacity: 0
}
},
State {
name: "open"
......@@ -159,6 +174,13 @@ Window {
easing.type: Easing.InOutQuad
}
}
OpacityAnimator {
target: fill
from: 0
to: 1
duration: units.shortDuration
easing.type: Easing.InOutQuad
}
}
}
]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment