on xenial help sign in
fix the spacing on top of sim unlock notifications
commitbbcac78a0b707a2738f4a3cea00054a58263d675 authorMichael Zanetti <michael.zanetti@canonical.com> dateWed 2 Jul 2014, 18:08 (12 years ago) parent9ecb67c
2 files changed+20−4
qml/Notifications/Notification.qml+3−3 qml/Notifications/Notifications.qml+17−1
qml/Notifications/Notification.qml+3−3
@@ -34,11 +34,10 @@ Item {
3434 property var hints
3535 property var notification
3636 property color color
37− property bool fullscreen
37+ property bool fullscreen: false
3838 property int maxHeight
3939 property int margins
4040
41− fullscreen: false
4241 objectName: "background"
4342 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
4443
@@ -262,6 +261,7 @@ Item {
262261 }
263262
264263 Column {
264+ id: dialogColumn
265265 objectName: "dialogListView"
266266 spacing: units.gu(2)
267267
@@ -277,7 +277,7 @@ Item {
277277 NotificationMenuItemFactory {
278278 id: menuItemFactory
279279
280− anchors.left: parent.left; anchors.right: parent.right
280+ anchors.left: dialogColumn.left; anchors.right: dialogColumn.right
281281
282282 menuModel: unityMenuModel
283283 menuData: model
qml/Notifications/Notifications.qml+17−1
@@ -36,8 +36,11 @@ ListView {
3636 filterRole: UnityNotifications.ModelInterface.RoleType
3737 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
3838 }
39− spacing: delegate.fullscreen ? 0 : units.gu(.5)
4039
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
4144 currentIndex: (currentIndex < 1 && count > 1) ? 1 : -1
4245
4346 delegate: Notification {
@@ -61,6 +64,19 @@ ListView {
6164 // make sure there's no opacity-difference between the several
6265 // elements in a notification
6366 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+ }
6480 }
6581
6682 populate: Transition {