on xenial help sign in
Add input-blocking shade beneath notifications... still needs to be restricted to snap-decisions only.
ac43dfeMirco Müller
qml/Notifications/Notifications.qml+15
@@ -25,6 +25,9 @@ ListView {
25 interactive: false
25 interactive: false
26
26
27 property real margin
27 property real margin
28+ property bool useModal
29+
30+ useModal: false
28
31
29 delegate: Notification {
32 delegate: Notification {
30 objectName: "notification" + index
33 objectName: "notification" + index
@@ -44,6 +47,18 @@ ListView {
44 maxHeight: notificationList.height
47 maxHeight: notificationList.height
45 margins: notificationList.margin
48 margins: notificationList.margin
46
49
50+ ListView.onAdd: {
51+ if (notificationList.count > 1) {
52+ notificationList.useModal = true;
53+ }
54+ }
55+
56+ ListView.onRemove: {
57+ if (notificationList.count <= 1) {
58+ notificationList.useModal = false;
59+ }
60+ }
61+
47 // make sure there's no opacity-difference between the several
62 // make sure there's no opacity-difference between the several
48 // elements in a notification
63 // elements in a notification
49 layer.enabled: add.running || remove.running || populate.running
64 layer.enabled: add.running || remove.running || populate.running
qml/Shell.qml+13
@@ -699,6 +699,19 @@ FocusScope {
699 }
699 }
700 }
700 }
701
701
702+ Rectangle {
703+ id: modalNotificationBackground
704+
705+ visible: notifications.useModal
706+ color: "#000000"
707+ anchors.fill: parent
708+ opacity: 0.5
709+
710+ MouseArea {
711+ anchors.fill: parent
712+ }
713+ }
714+
702 Notifications {
715 Notifications {
703 id: notifications
716 id: notifications
704
717