@@ -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