notifs: rounded clippingrect
This commit is contained in:
parent
e4770e51f5
commit
f6df636286
1 changed files with 64 additions and 58 deletions
|
|
@ -16,6 +16,15 @@ Item {
|
||||||
implicitWidth: NotifsConfig.sizes.width + root.padding * 2
|
implicitWidth: NotifsConfig.sizes.width + root.padding * 2
|
||||||
implicitHeight: list.implicitHeight + 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 {
|
ListView {
|
||||||
id: list
|
id: list
|
||||||
|
|
||||||
|
|
@ -23,10 +32,7 @@ Item {
|
||||||
values: [...Notifs.popups].reverse()
|
values: [...Notifs.popups].reverse()
|
||||||
}
|
}
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.fill: parent
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.margins: root.padding
|
|
||||||
|
|
||||||
implicitHeight: {
|
implicitHeight: {
|
||||||
let height = (count - 1) * spacing;
|
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
|
orientation: Qt.Vertical
|
||||||
spacing: Appearance.spacing.smaller
|
spacing: Appearance.spacing.smaller
|
||||||
cacheBuffer: QsWindow.window?.screen.height ?? 0
|
cacheBuffer: QsWindow.window?.screen.height ?? 0
|
||||||
clip: true
|
|
||||||
|
|
||||||
delegate: ClippingRectangle {
|
delegate: ClippingRectangle {
|
||||||
id: wrapper
|
id: wrapper
|
||||||
|
|
@ -92,6 +97,7 @@ Item {
|
||||||
Anim {}
|
Anim {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
component Anim: NumberAnimation {
|
component Anim: NumberAnimation {
|
||||||
duration: Appearance.anim.durations.normal
|
duration: Appearance.anim.durations.normal
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue