on xenial help sign in
Add input-blocking shade beneath notifications... still needs to be restricted to snap-decisions only.
commitac43dfe6e3f3a688acd251bdf77b349dfcb0b771 authorMirco Müller <mirco.mueller@canonical.com> dateThu 13 Mar 2014, 09:36 (13 years ago) parenta31b685
2 files changed+28
qml/Notifications/Notifications.qml+15 qml/Shell.qml+13
qml/Notifications/Notifications.qml+15
@@ -25,6 +25,9 @@ ListView {
2525 interactive: false
2626
2727 property real margin
28+ property bool useModal
29+
30+ useModal: false
2831
2932 delegate: Notification {
3033 objectName: "notification" + index
@@ -44,6 +47,18 @@ ListView {
4447 maxHeight: notificationList.height
4548 margins: notificationList.margin
4649
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+
4762 // make sure there's no opacity-difference between the several
4863 // elements in a notification
4964 layer.enabled: add.running || remove.running || populate.running
qml/Shell.qml+13
@@ -699,6 +699,19 @@ FocusScope {
699699 }
700700 }
701701
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+
702715 Notifications {
703716 id: notifications
704717