diff options
| -rw-r--r-- | modules/notifications/Notification.qml | 6 | ||||
| -rw-r--r-- | services/Notifs.qml | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/modules/notifications/Notification.qml b/modules/notifications/Notification.qml index 806a182..a6329e3 100644 --- a/modules/notifications/Notification.qml +++ b/modules/notifications/Notification.qml @@ -20,7 +20,7 @@ StyledRect { property bool expanded clip: true - color: Colours.palette.m3surfaceContainer + color: root.modelData.urgency === NotificationUrgency.Critical ? Colours.palette.m3secondaryContainer : Colours.palette.m3surfaceContainer radius: Appearance.rounding.normal implicitWidth: NotifsConfig.sizes.width implicitHeight: inner.height @@ -130,7 +130,7 @@ StyledRect { sourceComponent: StyledRect { radius: Appearance.rounding.full - color: Colours.palette.m3tertiaryContainer + color: root.modelData.urgency === NotificationUrgency.Critical ? Colours.palette.m3error : root.modelData.urgency === NotificationUrgency.Low ? Colours.palette.m3surfaceContainerHighest : Colours.palette.m3tertiaryContainer implicitWidth: root.hasImage ? NotifsConfig.sizes.badge : root.imageSize implicitHeight: root.hasImage ? NotifsConfig.sizes.badge : root.imageSize @@ -151,7 +151,7 @@ StyledRect { sourceComponent: Colouriser { source: icon - colorizationColor: Colours.palette.m3onTertiaryContainer + colorizationColor: root.modelData.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : root.modelData.urgency === NotificationUrgency.Low ? Colours.palette.m3onSurface : Colours.palette.m3onTertiaryContainer } } } diff --git a/services/Notifs.qml b/services/Notifs.qml index 4d1f986..d81b90d 100644 --- a/services/Notifs.qml +++ b/services/Notifs.qml @@ -55,6 +55,7 @@ Singleton { readonly property string appIcon: notification.appIcon readonly property string appName: notification.appName readonly property string image: notification.image + readonly property var urgency: notification.urgency // Idk why NotificationUrgency doesn't work readonly property list<NotificationAction> actions: notification.actions readonly property Timer timer: Timer { |