@@ -23,16 +23,12 @@ import "../Components"
24 id: greeter
24 id: greeter
25 enabled: visible
25 enabled: visible
26+ created: greeterContentLoader.status == Loader.Ready && greeterContentLoader.item.ready
27 property real dragHandleLeftMargin: 0
28 property real dragHandleLeftMargin: 0
29 property url background
30 property url background
31− function hideRight() {
32− d.forceRightOnNextHideAnimation = true;
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
46− // <dandrader> Is this really necessary?
47− property bool loadContent: false
42+ property bool loadContent: required
48− Component.onCompleted: {
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()
59+ function hideRight() {
60+ d.forceRightOnNextHideAnimation = true;
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()
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()