@@ -15,6 +15,7 @@
17import QtQuick 2.0
17import QtQuick 2.0
18import Ubuntu.Application 0.1
19import Ubuntu.Application 0.1
19import Ubuntu.Components 0.1
20import Ubuntu.Components 0.1
20import Ubuntu.Gestures 0.1
21import Ubuntu.Gestures 0.1
@@ -40,8 +41,8 @@ FocusScope {
40 height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
41 height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
42 property real edgeSize: units.gu(2)
43 property real edgeSize: units.gu(2)
43− property url default_background: shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg"
44+ property url defaultBackground: shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg"
44− property url background: default_background
45+ property url background: backgroundSettings.pictureUri
45 readonly property real panelHeight: panel.panelHeight
46 readonly property real panelHeight: panel.panelHeight
47 property bool dashShown: dash.shown
48 property bool dashShown: dash.shown
@@ -114,6 +115,11 @@ FocusScope {
119+ id: backgroundSettings
120+ schema.id: "org.gnome.desktop.background"
117 VolumeControl {
123 VolumeControl {
118 id: volumeControl
124 id: volumeControl
@@ -144,12 +150,16 @@ FocusScope {
144 // through the translucent parts of the shell surface.
150 // through the translucent parts of the shell surface.
145 visible: !fullyCovered && !applicationSurfaceShouldBeSeen
151 visible: !fullyCovered && !applicationSurfaceShouldBeSeen
147− Image {
153+ CrossFadeImage {
148 id: backgroundImage
154 id: backgroundImage
155+ objectName: "backgroundImage"
149 source: shell.background
156 source: shell.background
150− sourceSize.width: parent.width
151− sourceSize.height: parent.height
152 anchors.fill: parent
157 anchors.fill: parent
159+ if (status == Image.Error) {
160+ backgroundSettings.pictureUri = shell.defaultBackground
155 Rectangle {
165 Rectangle {
@@ -194,7 +204,6 @@ FocusScope {
199 id: stagesOuterContainer
208 id: stagesOuterContainer
@@ -259,7 +268,6 @@ FocusScope {
259 ignoreUnknownSignals: true
268 ignoreUnknownSignals: true
264 id: mainStage
272 id: mainStage
@@ -452,7 +460,7 @@ FocusScope {
452 onUnlocked: greeter.hide()
460 onUnlocked: greeter.hide()
453 onSelected: {
461 onSelected: {
454 var bgPath = greeter.model.data(uid, LightDM.UserRoles.BackgroundPathRole)
462 var bgPath = greeter.model.data(uid, LightDM.UserRoles.BackgroundPathRole)
455− shell.background = bgPath ? bgPath : default_background
463+ shell.background = bgPath ? bgPath : defaultBackground
458 onLeftTeaserPressedChanged: {
466 onLeftTeaserPressedChanged: {