diff --git a/lookandfeel/contents/lockscreen/LockOsd.qml b/lookandfeel/contents/lockscreen/LockOsd.qml --- a/lookandfeel/contents/lockscreen/LockOsd.qml +++ b/lookandfeel/contents/lockscreen/LockOsd.qml @@ -43,7 +43,7 @@ function show() { osd.visible = true; - hideTimer.restart(); + hideAnimation.restart(); } // avoid leaking ColorScope of lock screen theme into the OSD "popup" @@ -59,13 +59,25 @@ } } - 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; + } } } } diff --git a/lookandfeel/contents/lockscreen/LockScreenUi.qml b/lookandfeel/contents/lockscreen/LockScreenUi.qml --- a/lookandfeel/contents/lockscreen/LockScreenUi.qml +++ b/lookandfeel/contents/lockscreen/LockScreenUi.qml @@ -424,6 +424,7 @@ anchors { horizontalCenter: parent.horizontalCenter bottom: parent.bottom + bottomMargin: units.largeSpacing } }