on xenial help sign in
Enable notifications in greeter
2523892Michael Terry
GreeterShell.qml+35
@@ -27,6 +27,8 @@ import "Components"
27import "Greeter"
27import "Greeter"
28import "Launcher"
28import "Launcher"
29import "Panel"
29import "Panel"
30+import "Notifications"
31+import Unity.Notifications 1.0 as NotificationBackend
30
32
31BasicShell {
33BasicShell {
32 id: shell
34 id: shell
@@ -199,6 +201,39 @@ BasicShell {
199 }
201 }
200 onDashItemSelected: greeter.show()
202 onDashItemSelected: greeter.show()
201 }
203 }
204+
205+ Notifications {
206+ id: notifications
207+
208+ model: NotificationBackend.Model
209+ anchors {
210+ top: parent.top
211+ right: parent.right
212+ bottom: parent.bottom
213+ leftMargin: units.gu(1)
214+ rightMargin: units.gu(1)
215+ topMargin: panel.panelHeight + units.gu(1)
216+ }
217+ states: [
218+ State {
219+ name: "narrow"
220+ when: overlay.width <= units.gu(60)
221+ AnchorChanges { target: notifications; anchors.left: parent.left }
222+ },
223+ State {
224+ name: "wide"
225+ when: overlay.width > units.gu(60)
226+ AnchorChanges { target: notifications; anchors.left: undefined }
227+ PropertyChanges { target: notifications; width: units.gu(38) }
228+ }
229+ ]
230+
231+ InputFilterArea {
232+ anchors { left: parent.left; right: parent.right }
233+ height: parent.contentHeight
234+ blockInput: height > 0
235+ }
236+ }
202 }
237 }
203
238
204 Connections {
239 Connections {