diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-13 14:17:24 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-13 14:17:24 +1000 |
| commit | c64e6027257aaf555070089e34bda74c8318b097 (patch) | |
| tree | 8e73e02fb206ee091975c3ecfb1abc917bcd1adb /modules/notifications/Content.qml | |
| parent | bar: temp import players so ipc works (diff) | |
| download | caelestia-shell-c64e6027257aaf555070089e34bda74c8318b097.tar.gz caelestia-shell-c64e6027257aaf555070089e34bda74c8318b097.tar.bz2 caelestia-shell-c64e6027257aaf555070089e34bda74c8318b097.zip | |
notifs: better sliding
Wrap with clippingrect so x doesnt reset when element is added/removed
Also clippingrect rounds the ends when sliding
Diffstat (limited to 'modules/notifications/Content.qml')
| -rw-r--r-- | modules/notifications/Content.qml | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/modules/notifications/Content.qml b/modules/notifications/Content.qml index ecf2c0d..71cf0cf 100644 --- a/modules/notifications/Content.qml +++ b/modules/notifications/Content.qml @@ -2,6 +2,7 @@ import "root:/widgets" import "root:/services" import "root:/config" import Quickshell +import Quickshell.Widgets import QtQuick Item { @@ -34,20 +35,25 @@ Item { return Math.max(61, height); } - clip: true orientation: Qt.Vertical spacing: Appearance.spacing.smaller interactive: false - delegate: Notification {} + delegate: ClippingRectangle { + id: wrapper - add: Transition { - Anim { - property: "x" - from: NotifsConfig.sizes.width - to: 0 - duration: Appearance.anim.durations.large - easing.bezierCurve: Appearance.anim.curves.emphasizedDecel + required property Notifs.Notif modelData + readonly property alias nonAnimHeight: notif.nonAnimHeight + + color: "transparent" + radius: notif.radius + implicitWidth: notif.width + implicitHeight: notif.height + + Notification { + id: notif + + modelData: wrapper.modelData } } |