feat: fontbuilder to streamline font styling

This commit is contained in:
2026-09-30 14:23:31 +02:00
parent 2c90339c77
commit f825e4d53b
115 changed files with 1687 additions and 916 deletions
@@ -15,8 +15,7 @@ CustomRect {
radius: Tokens.rounding.small
Behavior on implicitHeight {
Anim {
}
Anim {}
}
RowLayout {
@@ -39,7 +38,7 @@ CustomRect {
anchors.centerIn: parent
color: IdleInhibitor.enabled ? Colors.palette.m3onSecondary : Colors.palette.m3onSecondaryContainer
font.pointSize: 18
fontStyle: Tokens.font.icon.large
text: "coffee"
}
}
@@ -51,7 +50,7 @@ CustomRect {
CustomText {
Layout.fillWidth: true
elide: Text.ElideRight
font.pointSize: 13
font: Tokens.font.body.medium
text: qsTr("Keep Awake")
}
@@ -59,7 +58,7 @@ CustomRect {
Layout.fillWidth: true
color: Colors.palette.m3onSurfaceVariant
elide: Text.ElideRight
font.pointSize: 11
font: Tokens.font.body.small
text: IdleInhibitor.enabled ? qsTr("Preventing sleep mode") : qsTr("Normal power management")
}
}
@@ -83,16 +82,13 @@ CustomRect {
scale: IdleInhibitor.enabled ? 1 : 0.5
Behavior on anchors.bottomMargin {
Anim {
}
Anim {}
}
Behavior on opacity {
Anim {
}
Anim {}
}
Behavior on scale {
Anim {
}
Anim {}
}
sourceComponent: CustomRect {
color: Colors.palette.m3primary
@@ -105,7 +101,7 @@ CustomRect {
anchors.centerIn: parent
color: Colors.palette.m3onPrimary
font.pointSize: Math.round(11 * 0.9)
font: Tokens.font.body.builders.small.size(Math.round(Tokens.font.body.small.pointSize * 0.9)).build()
text: qsTr("Active since %1").arg(Qt.formatTime(IdleInhibitor.enabledSince, Config.services.useTwelveHourClock ? "hh:mm a" : "hh:mm"))
}
}