@@ -15,7 +15,6 @@
17import QtQuick 2.0
17import QtQuick 2.0
19import Ubuntu.Application 0.1
18import Ubuntu.Application 0.1
20import Ubuntu.Components 0.1
19import Ubuntu.Components 0.1
21import Ubuntu.Gestures 0.1
20import Ubuntu.Gestures 0.1
@@ -43,8 +42,8 @@ FocusScope {
43 height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
42 height: tablet ? units.gu(100) : applicationArguments.hasGeometry() ? applicationArguments.height() : units.gu(71)
45 property real edgeSize: units.gu(2)
44 property real edgeSize: units.gu(2)
46− property url defaultBackground: shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg"
45+ property url default_background: shell.width >= units.gu(60) ? "graphics/tablet_background.jpg" : "graphics/phone_background.jpg"
47− property url background: backgroundSettings.pictureUri
46+ property url background: default_background
48 readonly property real panelHeight: panel.panelHeight
47 readonly property real panelHeight: panel.panelHeight
50 property bool dashShown: dash.shown
49 property bool dashShown: dash.shown
@@ -130,11 +129,6 @@ FocusScope {
134− id: backgroundSettings
135− schema.id: "org.gnome.desktop.background"
138 VolumeControl {
132 VolumeControl {
139 id: volumeControl
133 id: volumeControl
@@ -142,12 +136,6 @@ FocusScope {
142 Keys.onVolumeUpPressed: volumeControl.volumeUp()
136 Keys.onVolumeUpPressed: volumeControl.volumeUp()
143 Keys.onVolumeDownPressed: volumeControl.volumeDown()
137 Keys.onVolumeDownPressed: volumeControl.volumeDown()
146− if (event.key == Qt.Key_PowerOff) {
152 id: underlay
140 id: underlay
153 objectName: "underlay"
141 objectName: "underlay"
@@ -165,16 +153,12 @@ FocusScope {
165 // through the translucent parts of the shell surface.
153 // through the translucent parts of the shell surface.
166 visible: !fullyCovered && !applicationSurfaceShouldBeSeen
154 visible: !fullyCovered && !applicationSurfaceShouldBeSeen
168− CrossFadeImage {
156+ Image {
169 id: backgroundImage
157 id: backgroundImage
170− objectName: "backgroundImage"
171 source: shell.background
158 source: shell.background
159+ sourceSize.width: parent.width
160+ sourceSize.height: parent.height
172 anchors.fill: parent
161 anchors.fill: parent
174− if (status == Image.Error) {
175− backgroundSettings.pictureUri = shell.defaultBackground
180 Rectangle {
164 Rectangle {
@@ -263,6 +247,7 @@ FocusScope {
267 id: stagesOuterContainer
252 id: stagesOuterContainer
@@ -327,6 +312,7 @@ FocusScope {
327 ignoreUnknownSignals: true
312 ignoreUnknownSignals: true
331 id: mainStage
317 id: mainStage
@@ -505,7 +491,7 @@ FocusScope {
505 onSelected: {
491 onSelected: {
506 // Update background
492 // Update background
507 var bgPath = greeter.model.data(uid, LightDM.UserRoles.BackgroundPathRole)
493 var bgPath = greeter.model.data(uid, LightDM.UserRoles.BackgroundPathRole)
508− shell.background = bgPath ? bgPath : defaultBackground
494+ shell.background = bgPath ? bgPath : default_background
509 // Update edge demo hint
495 // Update edge demo hint
510 var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole)
496 var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole)
511 shell.showEdgeDemo = true //AccountsService.getUserProperty(user, "demo-edges")
497 shell.showEdgeDemo = true //AccountsService.getUserProperty(user, "demo-edges")
@@ -581,6 +567,7 @@ FocusScope {
581 onPowerStateChange: {
567 onPowerStateChange: {
582 if (state == 0) { // suspend
568 if (state == 0) { // suspend
583 powerConnection.setFocused(false);
569 powerConnection.setFocused(false);
584 } else if (state == 1) { // active
571 } else if (state == 1) { // active
585 powerConnection.setFocused(true);
572 powerConnection.setFocused(true);