summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/sidebar/NotifDock.qml1
-rw-r--r--modules/sidebar/NotifDockList.qml10
-rw-r--r--modules/sidebar/NotifGroup.qml2
-rw-r--r--modules/sidebar/NotifGroupList.qml9
4 files changed, 22 insertions, 0 deletions
diff --git a/modules/sidebar/NotifDock.qml b/modules/sidebar/NotifDock.qml
index e3267c3..7c71da8 100644
--- a/modules/sidebar/NotifDock.qml
+++ b/modules/sidebar/NotifDock.qml
@@ -106,6 +106,7 @@ Item {
id: notifList
props: root.props
+ container: view
}
}
}
diff --git a/modules/sidebar/NotifDockList.qml b/modules/sidebar/NotifDockList.qml
index 0fd3464..33a9306 100644
--- a/modules/sidebar/NotifDockList.qml
+++ b/modules/sidebar/NotifDockList.qml
@@ -10,6 +10,7 @@ Item {
id: root
required property Props props
+ required property Flickable container
readonly property alias repeater: repeater
readonly property int spacing: Appearance.spacing.small
@@ -59,6 +60,14 @@ Item {
return y;
}
+ containmentMask: QtObject {
+ function contains(p: point): bool {
+ if (!root.container.contains(notif.mapToItem(root.container, p)))
+ return false;
+ return notifInner.contains(p);
+ }
+ }
+
implicitWidth: root.width
implicitHeight: notifInner.implicitHeight
@@ -130,6 +139,7 @@ Item {
modelData: notif.modelData
props: root.props
+ container: root.container
}
Behavior on x {
diff --git a/modules/sidebar/NotifGroup.qml b/modules/sidebar/NotifGroup.qml
index 4366060..8a3d970 100644
--- a/modules/sidebar/NotifGroup.qml
+++ b/modules/sidebar/NotifGroup.qml
@@ -15,6 +15,7 @@ StyledRect {
required property string modelData
required property Props props
+ required property Flickable container
readonly property list<var> notifs: Notifs.list.filter(n => n.appName === modelData)
readonly property int notifCount: notifs.reduce((acc, n) => n.closed ? acc : acc + 1, 0)
@@ -231,6 +232,7 @@ StyledRect {
props: root.props
notifs: root.notifs
expanded: root.expanded
+ container: root.container
onRequestToggleExpand: expand => root.toggleExpand(expand)
}
}
diff --git a/modules/sidebar/NotifGroupList.qml b/modules/sidebar/NotifGroupList.qml
index 162c343..6a1a4b8 100644
--- a/modules/sidebar/NotifGroupList.qml
+++ b/modules/sidebar/NotifGroupList.qml
@@ -13,6 +13,7 @@ Item {
required property Props props
required property list<var> notifs
required property bool expanded
+ required property Flickable container
readonly property real nonAnimHeight: {
let h = -root.spacing;
@@ -60,6 +61,14 @@ Item {
return y;
}
+ containmentMask: QtObject {
+ function contains(p: point): bool {
+ if (!root.container.contains(notif.mapToItem(root.container, p)))
+ return false;
+ return notifInner.contains(p);
+ }
+ }
+
implicitWidth: root.width
implicitHeight: notifInner.implicitHeight