@@ -15,6 +15,7 @@
1515 */
1616
1717import QtQuick 2.0
18+import AccountsService 0.1
1819import Ubuntu.Components 0.1
1920import LightDM 0.1 as LightDM
2021import "../Components"
@@ -39,14 +40,30 @@ MouseArea {
3940 color: "black"
4041 }
4142
43+ property url backgroundValue: AccountsService.backgroundFile != undefined && AccountsService.backgroundFile.length > 0 ? AccountsService.backgroundFile : shell.defaultBackground
44+ onBackgroundValueChanged: wallpaper.source = backgroundValue
45+
4246 CrossFadeImage {
4347 id: wallpaper
44−
45− source: shell.background
4648 anchors.fill: parent
4749 fadeInFirst: false
4850 }
4951
52+ // See Shell.qml's backgroundSettings treatment for why we need a separate
53+ // Image, but it boils down to avoiding binding loop detection.
54+ Image {
55+ source: wallpaper.source
56+ height: 0
57+ width: 0
58+ sourceSize.height: 0
59+ sourceSize.width: 0
60+ onStatusChanged: {
61+ if (status == Image.Error && source != shell.defaultBackground) {
62+ wallpaper.source = shell.defaultBackground
63+ }
64+ }
65+ }
66+
5067 Rectangle {
5168 anchors.fill: parent
5269 color: "black"