refactor: migrate rest of controlcenter

This commit is contained in:
2 * r + 2 * t 2026-04-21 01:08:22 +10:00
parent c869eee460
commit ee60493bec
8 changed files with 28 additions and 36 deletions

View file

@ -79,7 +79,7 @@ Item {
text: "select_window"
color: Colours.palette.m3onPrimaryContainer
font.pointSize: Tokens.font.size.large
font: Tokens.font.icon.large
fill: 1
}
@ -193,7 +193,7 @@ Item {
text: item.icon
color: item.active ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurface
font.pointSize: Tokens.font.size.large
font: Tokens.font.icon.large
fill: item.active ? 1 : 0
Behavior on fill {
@ -211,7 +211,7 @@ Item {
opacity: 0
text: item.label
color: item.active ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurface
font.capitalization: Font.Capitalize
font: Tokens.font.label.builders.medium.capitalisation(Font.Capitalize).build()
}
StyledText {
@ -222,8 +222,7 @@ Item {
anchors.topMargin: Tokens.spacing.extraSmall
text: item.label
font.pointSize: Tokens.font.size.small
font.capitalization: Font.Capitalize
font: Tokens.font.label.builders.small.capitalisation(Font.Capitalize).build()
}
}
}

View file

@ -20,9 +20,7 @@ StyledRect {
anchors.bottom: parent.bottom
text: qsTr("Caelestia Settings - %1").arg(root.session.active)
font.capitalization: Font.Capitalize
font.pointSize: Tokens.font.size.larger
font.weight: 500
font: Tokens.font.title.builders.medium.capitalisation(Font.Capitalize).weight(500).build()
}
Item {

View file

@ -119,8 +119,7 @@ Item {
StyledText {
text: qsTr("Dashboard")
font.pointSize: Tokens.font.size.large
font.weight: 500
font: Tokens.font.title.builders.medium.weight(500).build()
}
}

View file

@ -17,7 +17,7 @@ SectionContainer {
StyledText {
text: qsTr("General Settings")
font.pointSize: Tokens.font.size.normal
font: Tokens.font.title.small
}
SwitchRow {

View file

@ -22,7 +22,7 @@ SectionContainer {
StyledText {
text: qsTr("Performance Resources")
font.pointSize: Tokens.font.size.normal
font: Tokens.font.title.small
}
ConnectedButtonGroup {

View file

@ -156,8 +156,7 @@ Item {
StyledText {
text: qsTr("Launcher")
font.pointSize: Tokens.font.size.large
font.weight: 500
font: Tokens.font.title.builders.medium.weight(500).build()
}
Item {
@ -168,9 +167,9 @@ Item {
toggled: !root.session.launcher.active
icon: "settings"
accent: "Primary"
iconSize: Tokens.font.size.normal
horizontalPadding: Tokens.padding.medium
verticalPadding: Tokens.padding.small
iconSize: Tokens.font.body.medium.pointSize
horizontalPadding: Tokens.padding.normal
verticalPadding: Tokens.padding.smaller
tooltip: qsTr("Launcher settings")
onClicked: {
@ -188,8 +187,7 @@ Item {
StyledText {
Layout.topMargin: Tokens.spacing.largeIncreased
text: qsTr("Applications (%1)").arg(root.searchText ? root.filteredApps.length : allAppsDb.apps.length)
font.pointSize: Tokens.font.size.normal
font.weight: 500
font: Tokens.font.title.builders.small.weight(500).build()
}
StyledText {
@ -354,7 +352,7 @@ Item {
StyledText {
Layout.fillWidth: true
text: modelData.name || modelData.entry?.name || qsTr("Unknown")
font.pointSize: Tokens.font.size.normal
font: Tokens.font.body.medium
}
Loader {
@ -546,7 +544,7 @@ Item {
asynchronous: true
Layout.alignment: Qt.AlignHCenter
implicitSize: Tokens.font.size.extraLarge * 3 * 2
implicitSize: Tokens.font.body.large.pointSize * 3 * 2
source: {
const app = appDetailsLayout.displayedApp;
if (!app)
@ -564,8 +562,7 @@ Item {
Layout.alignment: Qt.AlignHCenter
text: displayedApp ? (displayedApp.name || displayedApp.entry?.name || qsTr("Application Details")) : ""
font.pointSize: Tokens.font.size.large
font.bold: true
font: Tokens.font.title.builders.medium.weight(Font.Bold).build()
}
}
}

View file

@ -123,7 +123,7 @@ Item {
StyledText {
text: qsTr("Notifications")
font.pointSize: Tokens.font.size.normal
font: Tokens.font.title.small
}
SplitButtonRow {
@ -226,7 +226,7 @@ Item {
StyledText {
text: qsTr("Toast settings")
font.pointSize: Tokens.font.size.normal
font: Tokens.font.title.small
}
SplitButtonRow {

View file

@ -179,8 +179,7 @@ Item {
StyledText {
text: qsTr("Taskbar")
font.pointSize: Tokens.font.size.large
font.weight: 500
font: Tokens.font.title.builders.medium.weight(500).build()
}
}
@ -190,7 +189,7 @@ Item {
StyledText {
text: qsTr("Status Icons")
font.pointSize: Tokens.font.size.normal
font: Tokens.font.title.small
}
ConnectedButtonGroup {
@ -284,7 +283,7 @@ Item {
StyledText {
text: qsTr("Workspaces")
font.pointSize: Tokens.font.size.normal
font: Tokens.font.title.small
}
StyledRect {
@ -502,7 +501,7 @@ Item {
StyledText {
text: qsTr("Scroll Actions")
font.pointSize: Tokens.font.size.normal
font: Tokens.font.title.small
}
ConnectedButtonGroup {
@ -551,7 +550,7 @@ Item {
StyledText {
text: qsTr("Clock")
font.pointSize: Tokens.font.size.normal
font: Tokens.font.title.small
}
SwitchRow {
@ -588,7 +587,7 @@ Item {
StyledText {
text: qsTr("Bar Behavior")
font.pointSize: Tokens.font.size.normal
font: Tokens.font.title.small
}
SwitchRow {
@ -641,7 +640,7 @@ Item {
StyledText {
text: qsTr("Active window")
font.pointSize: Tokens.font.size.normal
font: Tokens.font.title.small
}
SwitchRow {
@ -677,7 +676,7 @@ Item {
StyledText {
text: qsTr("Popouts")
font.pointSize: Tokens.font.size.normal
font: Tokens.font.title.small
}
SwitchRow {
@ -714,7 +713,7 @@ Item {
StyledText {
text: qsTr("Tray Settings")
font.pointSize: Tokens.font.size.normal
font: Tokens.font.title.small
}
ConnectedButtonGroup {
@ -755,7 +754,7 @@ Item {
StyledText {
text: qsTr("Monitors")
font.pointSize: Tokens.font.size.normal
font: Tokens.font.title.small
}
ConnectedButtonGroup {