Commit 28a4a59b authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Lock Screen] Match OSD fade out to desktop

The Lock Screen implements its own OSD as the OSD will not render ontop of the lock screen.
This patch makes it apply the same long fadeout it has in the normal window.
Also add some spacing to the bottom of the screen. I did not place it exactly where the regular one would be
as the bottom placement was somewhat done to avoid it covering the password input.

Differential Revision: https://phabricator.kde.org/D12549
parent 839f310a
......@@ -43,7 +43,7 @@ PlasmaCore.FrameSvgItem {
function show() {
osd.visible = true;
hideTimer.restart();
hideAnimation.restart();
}
// avoid leaking ColorScope of lock screen theme into the OSD "popup"
......@@ -59,13 +59,25 @@ PlasmaCore.FrameSvgItem {
}
}
Timer {
id: hideTimer
interval: osd.timeout
onTriggered: {
osd.visible = false;
osd.icon = "";
osd.osdValue = 0;
SequentialAnimation {
id: hideAnimation
// prevent press and hold from flickering
PauseAnimation { duration: 100 }
NumberAnimation {
target: osd
property: "opacity"
from: 1
to: 0
duration: osd.timeout
easing.type: Easing.InQuad
}
ScriptAction {
script: {
osd.visible = false;
osd.opacity = 1;
osd.icon = "";
osd.osdValue = 0;
}
}
}
}
......@@ -424,6 +424,7 @@ PlasmaCore.ColorScope {
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
bottomMargin: units.largeSpacing
}
}
......
Supports Markdown
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