fix: notif sidebar tokens
This commit is contained in:
parent
0ae01c9163
commit
8b57f9259c
1 changed files with 8 additions and 7 deletions
|
|
@ -113,7 +113,7 @@ StyledRect {
|
||||||
MaterialIcon {
|
MaterialIcon {
|
||||||
text: Icons.getNotifIcon(root.activeNotifs[0]?.summary, root.urgency)
|
text: Icons.getNotifIcon(root.activeNotifs[0]?.summary, root.urgency)
|
||||||
color: root.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : root.urgency === NotificationUrgency.Low ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer
|
color: root.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : root.urgency === NotificationUrgency.Low ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer
|
||||||
fontStyle: Tokens.font.icon.large
|
fontStyle: Tokens.font.icon.medium
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -125,6 +125,7 @@ StyledRect {
|
||||||
Loader {
|
Loader {
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
anchors.verticalCenterOffset: sourceComponent === materialIconComp ? 1 : 0
|
||||||
sourceComponent: root.image ? imageComp : root.appIcon ? appIconComp : materialIconComp
|
sourceComponent: root.image ? imageComp : root.appIcon ? appIconComp : materialIconComp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -168,13 +169,13 @@ StyledRect {
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
spacing: Tokens.spacing.medium
|
spacing: Tokens.spacing.small
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: root.modelData
|
text: root.modelData
|
||||||
color: Colours.palette.m3onSurfaceVariant
|
color: Colours.palette.m3onSurfaceVariant
|
||||||
font: Tokens.font.title.small
|
font: Tokens.font.body.small
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -182,7 +183,7 @@ StyledRect {
|
||||||
animate: true
|
animate: true
|
||||||
text: root.activeNotifs[0]?.timeStr ?? ""
|
text: root.activeNotifs[0]?.timeStr ?? ""
|
||||||
color: Colours.palette.m3outline
|
color: Colours.palette.m3outline
|
||||||
font: Tokens.font.title.small
|
font: Tokens.font.body.small
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledRect {
|
StyledRect {
|
||||||
|
|
@ -209,14 +210,14 @@ StyledRect {
|
||||||
Layout.leftMargin: Tokens.padding.extraSmall / 2
|
Layout.leftMargin: Tokens.padding.extraSmall / 2
|
||||||
animate: true
|
animate: true
|
||||||
text: root.notifCount
|
text: root.notifCount
|
||||||
color: root.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : Colours.palette.m3onSurface
|
color: root.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : Colours.palette.m3onSurfaceVariant
|
||||||
font: Tokens.font.label.small
|
font: Tokens.font.body.small
|
||||||
}
|
}
|
||||||
|
|
||||||
MaterialIcon {
|
MaterialIcon {
|
||||||
Layout.rightMargin: -Tokens.padding.extraSmall / 2
|
Layout.rightMargin: -Tokens.padding.extraSmall / 2
|
||||||
text: "expand_more"
|
text: "expand_more"
|
||||||
color: root.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : Colours.palette.m3onSurface
|
color: root.urgency === NotificationUrgency.Critical ? Colours.palette.m3onError : Colours.palette.m3onSurfaceVariant
|
||||||
rotation: root.expanded ? 180 : 0
|
rotation: root.expanded ? 180 : 0
|
||||||
Layout.topMargin: root.expanded ? -Math.floor(Tokens.padding.extraSmall) : 0
|
Layout.topMargin: root.expanded ? -Math.floor(Tokens.padding.extraSmall) : 0
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue