diff options
| author | cordlessblues <75154048+cordlessblues@users.noreply.github.com> | 2026-03-15 02:27:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-15 18:27:46 +1100 |
| commit | 533b6590cddcea3e022a0547a3be248a691d7fee (patch) | |
| tree | 28b52b5734c9f88f8023b04cfc84decfec299642 | |
| parent | systemusage: optimized storage aggregation and improved device filtering (#1261) (diff) | |
| download | caelestia-shell-533b6590cddcea3e022a0547a3be248a691d7fee.tar.gz caelestia-shell-533b6590cddcea3e022a0547a3be248a691d7fee.tar.bz2 caelestia-shell-533b6590cddcea3e022a0547a3be248a691d7fee.zip | |
notifs: support int:value hint (#1254)
* add .vscode/settings.json to gitignore
* added support for the Int:value hint
* fix
* more fix
* f
* comment
---------
Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
| -rw-r--r-- | modules/notifications/Notification.qml | 37 | ||||
| -rw-r--r-- | services/Notifs.qml | 6 |
2 files changed, 43 insertions, 0 deletions
diff --git a/modules/notifications/Notification.qml b/modules/notifications/Notification.qml index 728cd9f..c8efa8d 100644 --- a/modules/notifications/Notification.qml +++ b/modules/notifications/Notification.qml @@ -10,6 +10,7 @@ import Quickshell.Widgets import Quickshell.Services.Notifications import QtQuick import QtQuick.Layouts +import QtQuick.Shapes StyledRect { id: root @@ -183,6 +184,42 @@ StyledRect { } } + Shape { + id: progressIndicator + + anchors.centerIn: appIcon + width: appIcon.implicitWidth + progressShape.strokeWidth * 2 + height: appIcon.implicitHeight + progressShape.strokeWidth * 2 + preferredRendererType: Shape.CurveRenderer + + ShapePath { + id: progressShape + + capStyle: ShapePath.RoundCap + fillColor: "transparent" + strokeWidth: 2 + strokeColor: Colours.palette.m3primary + + PathAngleArc { + id: progressArc + + radiusX: progressIndicator.width / 2 - Appearance.padding.small / 2 + centerX: progressIndicator.width / 2 + radiusY: progressIndicator.height / 2 - Appearance.padding.small / 2 + centerY: progressIndicator.height / 2 + + startAngle: -90 + sweepAngle: ((root.modelData.hints.value ?? 0) / 100) * 360 + + Behavior on sweepAngle { + Anim { + easing.bezierCurve: Appearance.anim.curves.emphasizedDecel + } + } + } + } + } + StyledText { id: appName diff --git a/services/Notifs.qml b/services/Notifs.qml index aa440fe..aff2dfc 100644 --- a/services/Notifs.qml +++ b/services/Notifs.qml @@ -186,6 +186,7 @@ Singleton { property string appIcon property string appName property string image + property var hints // Hints are not persisted across restarts property real expireTimeout: Config.notifs.defaultExpireTimeout property int urgency: NotificationUrgency.Normal property bool resident @@ -301,6 +302,10 @@ Singleton { invoke: () => a.invoke() })); } + + function onHintsChanged(): void { + notif.hints = notif.notification.hints; + } } function lock(item: Item): void { @@ -335,6 +340,7 @@ Singleton { if (notification?.image) dummyImageLoader.active = true; expireTimeout = notification.expireTimeout; + hints = notification.hints; urgency = notification.urgency; resident = notification.resident; hasActionIcons = notification.hasActionIcons; |