on xenial help sign in
fix the spacing on top of sim unlock notifications
bbcac78Michael Zanetti
qml/Notifications/Notification.qml+3−3
@@ -34,11 +34,10 @@ Item {
34 property var hints
34 property var hints
35 property var notification
35 property var notification
36 property color color
36 property color color
37− property bool fullscreen
37+ property bool fullscreen: false
38 property int maxHeight
38 property int maxHeight
39 property int margins
39 property int margins
40
40
41− fullscreen: false
42 objectName: "background"
41 objectName: "background"
43 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
42 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
44
43
@@ -262,6 +261,7 @@ Item {
262 }
261 }
263
262
264 Column {
263 Column {
264+ id: dialogColumn
265 objectName: "dialogListView"
265 objectName: "dialogListView"
266 spacing: units.gu(2)
266 spacing: units.gu(2)
267
267
@@ -277,7 +277,7 @@ Item {
277 NotificationMenuItemFactory {
277 NotificationMenuItemFactory {
278 id: menuItemFactory
278 id: menuItemFactory
279
279
280− anchors.left: parent.left; anchors.right: parent.right
280+ anchors.left: dialogColumn.left; anchors.right: dialogColumn.right
281
281
282 menuModel: unityMenuModel
282 menuModel: unityMenuModel
283 menuData: model
283 menuData: model
qml/Notifications/Notifications.qml+17−1
@@ -36,8 +36,11 @@ ListView {
36 filterRole: UnityNotifications.ModelInterface.RoleType
36 filterRole: UnityNotifications.ModelInterface.RoleType
37 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
37 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
38 }
38 }
39− spacing: delegate.fullscreen ? 0 : units.gu(.5)
40
39
40+ property bool topmostIsFullscreen: false
41+ spacing: topmostIsFullscreen ? 0 : units.gu(.5)
42+
43+ // FIXME: This doesn't make any sense and results in a binding loop
41 currentIndex: (currentIndex < 1 && count > 1) ? 1 : -1
44 currentIndex: (currentIndex < 1 && count > 1) ? 1 : -1
42
45
43 delegate: Notification {
46 delegate: Notification {
@@ -61,6 +64,19 @@ ListView {
61 // make sure there's no opacity-difference between the several
64 // make sure there's no opacity-difference between the several
62 // elements in a notification
65 // elements in a notification
63 layer.enabled: add.running || remove.running || populate.running
66 layer.enabled: add.running || remove.running || populate.running
67+
68+ Component.onCompleted: {
69+ if (index == 1) {
70+ notificationList.topmostIsFullscreen = fullscreen
71+ }
72+ }
73+
74+ onFullscreenChanged: {
75+ // index 1 because 0 is the PlaceHolder...
76+ if (index == 1) {
77+ notificationList.topmostIsFullscreen = fullscreen
78+ }
79+ }
64 }
80 }
65
81
66 populate: Transition {
82 populate: Transition {