summaryrefslogtreecommitdiff
path: root/modules/sidebar/NotifGroup.qml
diff options
context:
space:
mode:
Diffstat (limited to 'modules/sidebar/NotifGroup.qml')
-rw-r--r--modules/sidebar/NotifGroup.qml37
1 files changed, 12 insertions, 25 deletions
diff --git a/modules/sidebar/NotifGroup.qml b/modules/sidebar/NotifGroup.qml
index 154b530..4476bf9 100644
--- a/modules/sidebar/NotifGroup.qml
+++ b/modules/sidebar/NotifGroup.qml
@@ -1,7 +1,6 @@
pragma ComponentBehavior: Bound
import qs.components
-import qs.components.controls
import qs.components.effects
import qs.services
import qs.config
@@ -119,13 +118,15 @@ StyledRect {
}
ColumnLayout {
+ id: column
+
Layout.topMargin: -Appearance.padding.small
Layout.bottomMargin: -Appearance.padding.small / 2
Layout.fillWidth: true
- spacing: Math.round(Appearance.spacing.small / 2)
+ spacing: 0
RowLayout {
- Layout.bottomMargin: -parent.spacing
+ Layout.bottomMargin: root.expanded ? Math.round(Appearance.spacing.small / 2) : 0
Layout.fillWidth: true
spacing: Appearance.spacing.smaller
@@ -173,7 +174,7 @@ StyledRect {
Layout.leftMargin: Appearance.padding.small / 2
animate: true
- text: root.notifs.length
+ text: root.notifs.reduce((acc, n) => n.closed ? acc : acc + 1, 0)
color: root.urgency === "critical" ? Colours.palette.m3onError : Colours.palette.m3onSurface
font.pointSize: Appearance.font.size.small
}
@@ -186,31 +187,17 @@ StyledRect {
}
}
}
- }
-
- Repeater {
- id: notifList
- model: ScriptModel {
- values: root.expanded ? root.notifs : root.notifs.slice(0, Config.notifs.groupPreviewNum)
+ Behavior on Layout.bottomMargin {
+ Anim {}
}
+ }
- Layout.fillWidth: true
-
- Notif {
- id: notif
-
- props: root.props
- expanded: root.expanded
- }
+ NotifGroupList {
+ props: root.props
+ notifs: root.notifs
+ expanded: root.expanded
}
}
}
-
- // Behavior on implicitHeight {
- // Anim {
- // duration: Appearance.anim.durations.expressiveDefaultSpatial
- // easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
- // }
- // }
}