diff options
Diffstat (limited to 'modules/notifications')
| -rw-r--r-- | modules/notifications/Notification.qml | 37 |
1 files changed, 37 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 |