on xenial help sign in
Restoring a bunch of deleted/modified
commit4964b1d4f14b413c7fcaada1d3c426bab0eabab9 authorDaniel d'Andrada <daniel.dandrada@canonical.com> dateMon 8 Dec 2014, 15:39 (12 years ago) parenta258c2d
2 files changed+12−15
qml/Greeter/Greeter.qml+9−12 qml/Shell.qml+3−3
qml/Greeter/Greeter.qml+9−12
@@ -23,16 +23,12 @@ import "../Components"
2323Showable {
2424 id: greeter
2525 enabled: visible
26+ created: greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready
2627
2728 property real dragHandleLeftMargin: 0
2829
2930 property url background
3031
31− function hideRight() {
32− d.forceRightOnNextHideAnimation = true;
33− hide();
34− }
35−
3632 prepareToHide: function () {
3733 hideTranslation.to = greeter.x > 0 || d.forceRightOnNextHideAnimation ? greeter.width : -greeter.width;
3834 d.forceRightOnNextHideAnimation = false;
@@ -43,11 +39,7 @@ Showable {
4339 property bool forceRightOnNextHideAnimation: false
4440 }
4541
46− // <dandrader> Is this really necessary?
47− property bool loadContent: false
48− Component.onCompleted: {
49− loadContent = true;
50− }
42+ property bool loadContent: required
5143
5244 // 1 when fully shown and 0 when fully hidden
5345 property real showProgress: visible ? MathUtils.clamp((width - Math.abs(x)) / width, 0, 1) : 0
@@ -64,14 +56,19 @@ Showable {
6456 signal unlocked(int uid)
6557 signal tapped()
6658
59+ function hideRight() {
60+ d.forceRightOnNextHideAnimation = true;
61+ hide();
62+ }
63+
6764 function tryToUnlock() {
68− if (greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready) {
65+ if (created) {
6966 greeterContentLoader.item.tryToUnlock()
7067 }
7168 }
7269
7370 function reset() {
74− if (greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready) {
71+ if (created) {
7572 greeterContentLoader.item.reset()
7673 }
7774 }
qml/Shell.qml+3−3
@@ -543,6 +543,9 @@ Item {
543543 property string lockedApp: ""
544544 property bool hasLockedApp: lockedApp !== ""
545545
546+ hides: [launcher, panel.indicators]
547+ loadContent: required || lockscreen.required // keeps content in memory for quick show()
548+
546549 locked: shell.locked
547550
548551 background: shell.background
@@ -582,9 +585,6 @@ Item {
582585
583586 onShownChanged: {
584587 if (shown) {
585− launcher.hide();
586− panel.indicators.hide();
587−
588588 // Disable everything so that user can't swipe greeter or
589589 // launcher until we get the next prompt/authenticate, which
590590 // will re-enable the shell.