on xenial help sign in
Make sure greeter and lockscreen backgrounds are always defined, even if the wallpaper preference string is bogus. Fixes: https://bugs.launchpad.net/bugs/1208889, https://bugs.launchpad.net/bugs/1208894.

Approved by PS Jenkins bot, Michael Zanetti.

commit66f63848a201558e81a244764309be692e9403d5 authorMichael Terry <michael.terry@canonical.com> dateThu 29 Aug 2013, 08:07 (13 years ago) parentcb6d2b200ec395
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.source == "" || wallpaper.status == Image.Ready || wallpaper.status == Image.Error
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