on xenial help sign in
fix it for real
commit9a98b849e8ea452f383a341a2ffa448786f59590 authorMichael Zanetti <michael.zanetti@canonical.com> dateWed 12 Nov 2014, 12:52 (12 years ago) parentaf583f7
2 files changed+21−20
qml/Notifications/NotificationMenuItemFactory.qml+1 qml/Shell.qml+20−20
qml/Notifications/NotificationMenuItemFactory.qml+1
@@ -145,6 +145,7 @@ Loader {
145145 errorText: errorAction.valid ? errorAction.state : ""
146146 retryText: notification.body
147147 background: shell.background
148+ darkenBackground: 0.4
148149
149150 onEntered: {
150151 menuModel.changeState(menuIndex, passphrase);
qml/Shell.qml+20−20
@@ -51,7 +51,8 @@ Item {
5151
5252 property real edgeSize: units.gu(2)
5353 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
5556 readonly property real panelHeight: panel.panelHeight
5657
5758 readonly property bool locked: LightDM.Greeter.active && !LightDM.Greeter.authenticated && !forcedUnlock
@@ -98,19 +99,29 @@ Item {
9899 shell.activateApplication(app);
99100 }
100101
101− // This is a dummy image to detect if the custom set wallpaper
102− // loads successfully. If it doesn't, fall back to the defaultBackground.
102+ // This is a dummy image to detect if the custom AS set wallpaper loads successfully.
103103 Image {
104− source: shell.background
104+ id: asImageTester
105+ source: AccountsService.backgroundFile != undefined && AccountsService.backgroundFile.length > 0 ? AccountsService.backgroundFile : ""
106+ height: 0
107+ width: 0
108+ sourceSize.height: 0
109+ sourceSize.width: 0
110+ }
111+
112+ GSettings {
113+ id: backgroundSettings
114+ schema.id: "org.gnome.desktop.background"
115+ }
116+
117+ // This is a dummy image to detect if the custom GSettings set wallpaper loads successfully.
118+ Image {
119+ id: gsImageTester
120+ source: backgroundSettings.pictureUri != undefined && backgroundSettings.pictureUri.length > 0 ? backgroundSettings.pictureUri : ""
105121 height: 0
106122 width: 0
107123 sourceSize.height: 0
108124 sourceSize.width: 0
109− onStatusChanged: {
110− if (status == Image.Error && source != shell.defaultBackground) {
111− shell.background = shell.defaultBackground
112− }
113− }
114125 }
115126
116127 Binding {
@@ -129,17 +140,6 @@ Item {
129140 }
130141 }
131142
132− GSettings {
133− id: backgroundSettings
134− schema.id: "org.gnome.desktop.background"
135− }
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
140− }
141− }
142−
143143 VolumeControl {
144144 id: volumeControl
145145 }