internal: move notif icon lower

This commit is contained in:
2 * r + 2 * t 2025-08-27 18:02:51 +10:00
parent b5d8125867
commit 8311eed7a6
3 changed files with 3 additions and 2 deletions

View file

@ -79,7 +79,7 @@ StyledRect {
id: materialIconComp id: materialIconComp
MaterialIcon { MaterialIcon {
text: Icons.getNotifIcon(root.notifs[0].summary.toLowerCase(), root.urgency) text: Icons.getNotifIcon(root.notifs[0].summary, root.urgency)
color: root.urgency === "critical" ? Colours.palette.m3onError : root.urgency === "low" ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer color: root.urgency === "critical" ? Colours.palette.m3onError : root.urgency === "low" ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer
font.pointSize: Appearance.font.size.large font.pointSize: Appearance.font.size.large
} }

View file

@ -176,7 +176,7 @@ StyledRect {
anchors.verticalCenterOffset: Appearance.font.size.large * 0.02 anchors.verticalCenterOffset: Appearance.font.size.large * 0.02
sourceComponent: MaterialIcon { sourceComponent: MaterialIcon {
text: Icons.getNotifIcon(root.modelData.summary.toLowerCase(), root.modelData.urgency) text: Icons.getNotifIcon(root.modelData.summary, root.modelData.urgency)
color: root.modelData.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : root.modelData.urgency === NotificationUrgency.Low ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer color: root.modelData.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : root.modelData.urgency === NotificationUrgency.Low ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer
font.pointSize: Appearance.font.size.large font.pointSize: Appearance.font.size.large

View file

@ -147,6 +147,7 @@ Singleton {
} }
function getNotifIcon(summary: string, urgency: int): string { function getNotifIcon(summary: string, urgency: int): string {
summary = summary.toLowerCase();
if (summary.includes("reboot")) if (summary.includes("reboot"))
return "restart_alt"; return "restart_alt";
if (summary.includes("recording")) if (summary.includes("recording"))