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
+10 -9
View File
@@ -107,7 +107,7 @@ VerticalFadeFlickable {
anchors.fill: parent
anchors.margins: Tokens.padding.large
spacing: Tokens.spacing.small
spacing: Tokens.spacing.medium
CustomRect {
Layout.bottomMargin: -1
@@ -122,7 +122,7 @@ VerticalFadeFlickable {
anchors.verticalCenterOffset: 1
color: item.isCurrentPage ? Colors.palette.m3onPrimary : Colors.palette.m3onSecondaryContainer
fill: item.modelData.noFill ? 0 : 1
font.pointSize: Tokens.font.size.large
fontStyle: Tokens.font.icon.builders.medium.weight(Font.Medium).build()
grade: 25
text: item.modelData.icon
}
@@ -135,6 +135,7 @@ VerticalFadeFlickable {
CustomText {
Layout.fillWidth: true
elide: Text.ElideRight
font: Tokens.font.body.medium
text: item.modelData.name
}
@@ -142,6 +143,7 @@ VerticalFadeFlickable {
Layout.fillWidth: true
color: Colors.palette.m3onSurfaceVariant
elide: Text.ElideRight
font: Tokens.font.label.small
text: item.modelData.description
}
}
@@ -198,7 +200,7 @@ VerticalFadeFlickable {
MaterialIcon {
color: Colors.palette.m3primary
fill: 1
font.pointSize: Tokens.font.size.large
fontStyle: Tokens.font.icon.builders.medium.weight(Font.Medium).build()
text: group.modelData.icon
}
@@ -206,7 +208,7 @@ VerticalFadeFlickable {
Layout.fillWidth: true
color: Colors.palette.m3secondary
elide: Text.ElideRight
font.pointSize: Tokens.font.size.large
font: Tokens.font.body.large
text: group.modelData.page
}
}
@@ -283,7 +285,7 @@ VerticalFadeFlickable {
Layout.fillWidth: true
color: Colors.palette.m3onSurfaceVariant
elide: Text.ElideRight
font.pointSize: Tokens.font.size.small
font: Tokens.font.label.small
text: {
const labels = result.modelData.crumbLabels.slice(1);
const section = result.modelData.section;
@@ -297,7 +299,6 @@ VerticalFadeFlickable {
Layout.fillWidth: true
color: Colors.palette.m3onSurface
elide: Text.ElideRight
font.pointSize: Tokens.font.size.normal
text: SettingsSearcher.highlight(result.modelData.title, root.search, Colors.palette.m3primary)
textFormat: text.includes("<font") ? Text.StyledText : Text.PlainText
}
@@ -306,7 +307,7 @@ VerticalFadeFlickable {
Layout.fillWidth: true
color: Colors.palette.m3outline
elide: Text.ElideRight
font.pointSize: Tokens.font.size.small
font: Tokens.font.label.small
text: SettingsSearcher.highlight(result.modelData.subtext, root.search, Colors.palette.m3primary)
textFormat: text.includes("<font") ? Text.StyledText : Text.PlainText
visible: result.modelData.subtext.length > 0
@@ -319,7 +320,8 @@ VerticalFadeFlickable {
z: 1
onClicked: {
root.sState.jumpToSetting(result.modelData.pageIdx, result.modelData.subPath, result.modelData.anchor);
const target = result.modelData.targetSubPath;
root.sState.jumpToSetting(result.modelData.pageIdx, target.length > 0 ? target : result.modelData.subPath, target.length > 0 ? "" : result.modelData.anchor);
}
}
@@ -349,7 +351,6 @@ VerticalFadeFlickable {
Layout.fillWidth: true
Layout.topMargin: Tokens.padding.large
color: Colors.palette.m3onSurfaceVariant
font.pointSize: Tokens.font.size.normal
horizontalAlignment: Text.AlignHCenter
text: qsTr("No matching settings")
visible: root.searching && root.results.length === 0