on xenial help sign in
Make sure greeter and lockscreen backgrounds are always defined, even if the wallpaper preference string is bogus
d54ad81Michael Terry
Greeter/GreeterContent.qml+8−1
@@ -23,7 +23,7 @@ MouseArea {
23 id: root
23 id: root
24 anchors.fill: parent
24 anchors.fill: parent
25
25
26− property bool ready: wallpaper.status == Image.Ready
26+ property bool ready: wallpaper.status != Image.Loading // null, ready, and error are all end states
27 property bool leftTeaserPressed: teasingMouseArea.pressed &&
27 property bool leftTeaserPressed: teasingMouseArea.pressed &&
28 teasingMouseArea.mouseX < teasingMouseArea.width / 2
28 teasingMouseArea.mouseX < teasingMouseArea.width / 2
29 property bool rightTeaserPressed: teasingMouseArea.pressed &&
29 property bool rightTeaserPressed: teasingMouseArea.pressed &&
@@ -32,6 +32,13 @@ MouseArea {
32 signal selected(int uid)
32 signal selected(int uid)
33 signal unlocked(int uid)
33 signal unlocked(int uid)
34
34
35+ Rectangle {
36+ // In case wallpaper fails to load
37+ id: wallpaperBackup
38+ anchors.fill: parent
39+ color: "black"
40+ }
41+
35 CrossFadeImage {
42 CrossFadeImage {
36 id: wallpaper
43 id: wallpaper
37
44
Greeter/Lockscreen.qml+8
@@ -53,7 +53,15 @@ Showable {
53 pinPadLoader.resetting = false;
53 pinPadLoader.resetting = false;
54 }
54 }
55
55
56+ Rectangle {
57+ // In case wallpaper fails to load or is undefined
58+ id: wallpaperBackup
59+ anchors.fill: parent
60+ color: "black"
61+ }
62+
56 Image {
63 Image {
64+ id: wallpaper
57 anchors.fill: parent
65 anchors.fill: parent
58 source: root.required ? root.background : ""
66 source: root.required ? root.background : ""
59 fillMode: Image.PreserveAspectCrop
67 fillMode: Image.PreserveAspectCrop