on xenial help sign in
Restoring a bunch of deleted/modified
4964b1dDaniel d'Andrada
qml/Greeter/Greeter.qml+9−12
@@ -23,16 +23,12 @@ import "../Components"
23Showable {
23Showable {
24 id: greeter
24 id: greeter
25 enabled: visible
25 enabled: visible
26+ created: greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready
26
27
27 property real dragHandleLeftMargin: 0
28 property real dragHandleLeftMargin: 0
28
29
29 property url background
30 property url background
30
31
31− function hideRight() {
32− d.forceRightOnNextHideAnimation = true;
33− hide();
34− }
35−
36 prepareToHide: function () {
32 prepareToHide: function () {
37 hideTranslation.to = greeter.x > 0 || d.forceRightOnNextHideAnimation ? greeter.width : -greeter.width;
33 hideTranslation.to = greeter.x > 0 || d.forceRightOnNextHideAnimation ? greeter.width : -greeter.width;
38 d.forceRightOnNextHideAnimation = false;
34 d.forceRightOnNextHideAnimation = false;
@@ -43,11 +39,7 @@ Showable {
43 property bool forceRightOnNextHideAnimation: false
39 property bool forceRightOnNextHideAnimation: false
44 }
40 }
45
41
46− // <dandrader> Is this really necessary?
47− property bool loadContent: false
42+ property bool loadContent: required
48− Component.onCompleted: {
49− loadContent = true;
50− }
51
43
52 // 1 when fully shown and 0 when fully hidden
44 // 1 when fully shown and 0 when fully hidden
53 property real showProgress: visible ? MathUtils.clamp((width - Math.abs(x)) / width, 0, 1) : 0
45 property real showProgress: visible ? MathUtils.clamp((width - Math.abs(x)) / width, 0, 1) : 0
@@ -64,14 +56,19 @@ Showable {
64 signal unlocked(int uid)
56 signal unlocked(int uid)
65 signal tapped()
57 signal tapped()
66
58
59+ function hideRight() {
60+ d.forceRightOnNextHideAnimation = true;
61+ hide();
62+ }
63+
67 function tryToUnlock() {
64 function tryToUnlock() {
68− if (greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready) {
65+ if (created) {
69 greeterContentLoader.item.tryToUnlock()
66 greeterContentLoader.item.tryToUnlock()
70 }
67 }
71 }
68 }
72
69
73 function reset() {
70 function reset() {
74− if (greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready) {
71+ if (created) {
75 greeterContentLoader.item.reset()
72 greeterContentLoader.item.reset()
76 }
73 }
77 }
74 }
qml/Shell.qml+3−3
@@ -543,6 +543,9 @@ Item {
543 property string lockedApp: ""
543 property string lockedApp: ""
544 property bool hasLockedApp: lockedApp !== ""
544 property bool hasLockedApp: lockedApp !== ""
545
545
546+ hides: [launcher, panel.indicators]
547+ loadContent: required || lockscreen.required // keeps content in memory for quick show()
548+
546 locked: shell.locked
549 locked: shell.locked
547
550
548 background: shell.background
551 background: shell.background
@@ -582,9 +585,6 @@ Item {
582
585
583 onShownChanged: {
586 onShownChanged: {
584 if (shown) {
587 if (shown) {
585− launcher.hide();
586− panel.indicators.hide();
587−
588 // Disable everything so that user can't swipe greeter or
588 // Disable everything so that user can't swipe greeter or
589 // launcher until we get the next prompt/authenticate, which
589 // launcher until we get the next prompt/authenticate, which
590 // will re-enable the shell.
590 // will re-enable the shell.