From 5c807fc5494357fa272255564a04c245e9a3713f Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 10 May 2025 22:58:48 +1000 Subject: notifs: colour by urgency --- modules/notifications/Notification.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/notifications/Notification.qml') 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 } } } -- cgit v1.2.3-freya