on xenial help sign in
Keep greeter content in memory for a quick show() call when cancelling on the lockscreen
c4fc210Michael Terry
qml/Greeter/Greeter.qml+3−2
@@ -26,11 +26,12 @@ Showable {
26 created: greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready
26 created: greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready
27
27
28 property url defaultBackground
28 property url defaultBackground
29+ property bool loadContent: required
29
30
30 // 1 when fully shown and 0 when fully hidden
31 // 1 when fully shown and 0 when fully hidden
31 property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1)
32 property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1)
32
33
33− showAnimation: StandardAnimation { property: "x"; to: 0 }
34+ showAnimation: StandardAnimation { property: "x"; to: 0; duration: UbuntuAnimation.FastDuration }
34 hideAnimation: __leftHideAnimation
35 hideAnimation: __leftHideAnimation
35
36
36 property alias dragHandleWidth: dragHandle.width
37 property alias dragHandleWidth: dragHandle.width
@@ -126,7 +127,7 @@ Showable {
126 property var infographicModel: LightDM.Infographic
127 property var infographicModel: LightDM.Infographic
127 readonly property int backgroundTopMargin: -greeter.y
128 readonly property int backgroundTopMargin: -greeter.y
128
129
129− source: required ? "GreeterContent.qml" : ""
130+ source: loadContent ? "GreeterContent.qml" : ""
130
131
131 onLoaded: {
132 onLoaded: {
132 selected(currentIndex);
133 selected(currentIndex);
qml/Shell.qml+1
@@ -588,6 +588,7 @@ FocusScope {
588 available: true
588 available: true
589 hides: [launcher, panel.indicators]
589 hides: [launcher, panel.indicators]
590 shown: true
590 shown: true
591+ loadContent: required || lockscreen.required // keeps content in memory for quick show()
591
592
592 defaultBackground: shell.background
593 defaultBackground: shell.background
593
594