on xenial help sign in
Make sure greeter and lockscreen backgrounds are always defined, even if the wallpaper preference string is bogus
commitd54ad8150d76e9665cc1049945c5e1df962f0916 authorMichael Terry <michael.terry@canonical.com> dateTue 13 Aug 2013, 20:01 (13 years ago) parent4390683
2 files changed+16−1
Greeter/GreeterContent.qml+8−1 Greeter/Lockscreen.qml+8
Greeter/GreeterContent.qml+8−1
@@ -23,7 +23,7 @@ MouseArea {
2323 id: root
2424 anchors.fill: parent
2525
26− property bool ready: wallpaper.status == Image.Ready
26+ property bool ready: wallpaper.status != Image.Loading // null, ready, and error are all end states
2727 property bool leftTeaserPressed: teasingMouseArea.pressed &&
2828 teasingMouseArea.mouseX < teasingMouseArea.width / 2
2929 property bool rightTeaserPressed: teasingMouseArea.pressed &&
@@ -32,6 +32,13 @@ MouseArea {
3232 signal selected(int uid)
3333 signal unlocked(int uid)
3434
35+ Rectangle {
36+ // In case wallpaper fails to load
37+ id: wallpaperBackup
38+ anchors.fill: parent
39+ color: "black"
40+ }
41+
3542 CrossFadeImage {
3643 id: wallpaper
3744
Greeter/Lockscreen.qml+8
@@ -53,7 +53,15 @@ Showable {
5353 pinPadLoader.resetting = false;
5454 }
5555
56+ Rectangle {
57+ // In case wallpaper fails to load or is undefined
58+ id: wallpaperBackup
59+ anchors.fill: parent
60+ color: "black"
61+ }
62+
5663 Image {
64+ id: wallpaper
5765 anchors.fill: parent
5866 source: root.required ? root.background : ""
5967 fillMode: Image.PreserveAspectCrop