notifs: colour by urgency
This commit is contained in:
parent
901ad989d5
commit
5c807fc549
2 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue