internal: move notif icon lower
This commit is contained in:
parent
b5d8125867
commit
8311eed7a6
3 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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"))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue