notifs: rounded clippingrect

This commit is contained in:
2 * r + 2 * t 2025-05-27 09:08:19 +08:00
parent e4770e51f5
commit f6df636286

View file

@ -16,6 +16,15 @@ Item {
implicitWidth: NotifsConfig.sizes.width + root.padding * 2
implicitHeight: list.implicitHeight + root.padding * 2
ClippingWrapperRectangle {
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: root.padding
color: "transparent"
radius: Appearance.rounding.normal
ListView {
id: list
@ -23,10 +32,7 @@ Item {
values: [...Notifs.popups].reverse()
}
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: root.padding
anchors.fill: parent
implicitHeight: {
let height = (count - 1) * spacing;
@ -50,13 +56,12 @@ Item {
}
}
return Math.max(61, Math.min(screen?.height - root.padding * 2 - BorderConfig.thickness * 2, height));
return Math.max(61, Math.min((screen?.height ?? 0) - root.padding * 2 - BorderConfig.thickness * 2, height));
}
orientation: Qt.Vertical
spacing: Appearance.spacing.smaller
cacheBuffer: QsWindow.window?.screen.height ?? 0
clip: true
delegate: ClippingRectangle {
id: wrapper
@ -92,6 +97,7 @@ Item {
Anim {}
}
}
}
component Anim: NumberAnimation {
duration: Appearance.anim.durations.normal