@@ -51,7 +51,8 @@ Item {
52 property real edgeSize: units.gu(2)
52 property real edgeSize: units.gu(2)
53 property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg")
53 property url defaultBackground: Qt.resolvedUrl(shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg")
54− property url background: AccountsService.backgroundFile != undefined && AccountsService.backgroundFile.length > 0 ? AccountsService.backgroundFile : defaultBackground
54+ property url background: asImageTester.status == Image.Ready ? asImageTester.source
55+ : gsImageTester.status == Image.Ready ? gsImageTester.source : defaultBackground
55 readonly property real panelHeight: panel.panelHeight
56 readonly property real panelHeight: panel.panelHeight
57 readonly property bool locked: LightDM.Greeter.active && !LightDM.Greeter.authenticated && !forcedUnlock
58 readonly property bool locked: LightDM.Greeter.active && !LightDM.Greeter.authenticated && !forcedUnlock
@@ -98,19 +99,29 @@ Item {
98 shell.activateApplication(app);
99 shell.activateApplication(app);
101− // This is a dummy image to detect if the custom set wallpaper
102+ // This is a dummy image to detect if the custom AS set wallpaper loads successfully.
102− // loads successfully. If it doesn't, fall back to the defaultBackground.
104− source: shell.background
104+ id: asImageTester
105+ source: AccountsService.backgroundFile != undefined && AccountsService.backgroundFile.length > 0 ? AccountsService.backgroundFile : ""
108+ sourceSize.height: 0
113+ id: backgroundSettings
114+ schema.id: "org.gnome.desktop.background"
117+ // This is a dummy image to detect if the custom GSettings set wallpaper loads successfully.
120+ source: backgroundSettings.pictureUri != undefined && backgroundSettings.pictureUri.length > 0 ? backgroundSettings.pictureUri : ""
105 height: 0
121 height: 0
107 sourceSize.height: 0
123 sourceSize.height: 0
108 sourceSize.width: 0
124 sourceSize.width: 0
110− if (status == Image.Error && source != shell.defaultBackground) {
111− shell.background = shell.defaultBackground
116 Binding {
127 Binding {
@@ -129,17 +140,6 @@ Item {
133− id: backgroundSettings
134− schema.id: "org.gnome.desktop.background"
136− property url gSettingsPicture: backgroundSettings.pictureUri != undefined && backgroundSettings.pictureUri.length > 0 ? backgroundSettings.pictureUri : shell.defaultBackground
137− onGSettingsPictureChanged: {
138− if (AccountsService.backgroundFile == undefined || AccountsService.backgroundFile.length == 0) {
139− shell.background = gSettingsPicture
143 VolumeControl {
143 VolumeControl {
144 id: volumeControl
144 id: volumeControl