From ee60493becbf840a6cfb17e3969ed167775a850b Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 21 Apr 2026 01:08:22 +1000 Subject: [PATCH] refactor: migrate rest of controlcenter --- modules/controlcenter/NavRail.qml | 9 ++++---- modules/controlcenter/WindowTitle.qml | 4 +--- .../controlcenter/dashboard/DashboardPane.qml | 3 +-- .../dashboard/GeneralSection.qml | 2 +- .../dashboard/PerformanceSection.qml | 2 +- .../controlcenter/launcher/LauncherPane.qml | 19 +++++++---------- .../notifications/NotificationsPane.qml | 4 ++-- modules/controlcenter/taskbar/TaskbarPane.qml | 21 +++++++++---------- 8 files changed, 28 insertions(+), 36 deletions(-) diff --git a/modules/controlcenter/NavRail.qml b/modules/controlcenter/NavRail.qml index 2c1aa149..cdfa1522 100644 --- a/modules/controlcenter/NavRail.qml +++ b/modules/controlcenter/NavRail.qml @@ -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() } } } diff --git a/modules/controlcenter/WindowTitle.qml b/modules/controlcenter/WindowTitle.qml index 1e6e5c48..01255d8b 100644 --- a/modules/controlcenter/WindowTitle.qml +++ b/modules/controlcenter/WindowTitle.qml @@ -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 { diff --git a/modules/controlcenter/dashboard/DashboardPane.qml b/modules/controlcenter/dashboard/DashboardPane.qml index 92b08e8b..cf2a8b3f 100644 --- a/modules/controlcenter/dashboard/DashboardPane.qml +++ b/modules/controlcenter/dashboard/DashboardPane.qml @@ -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() } } diff --git a/modules/controlcenter/dashboard/GeneralSection.qml b/modules/controlcenter/dashboard/GeneralSection.qml index edaeb7ef..42b67c79 100644 --- a/modules/controlcenter/dashboard/GeneralSection.qml +++ b/modules/controlcenter/dashboard/GeneralSection.qml @@ -17,7 +17,7 @@ SectionContainer { StyledText { text: qsTr("General Settings") - font.pointSize: Tokens.font.size.normal + font: Tokens.font.title.small } SwitchRow { diff --git a/modules/controlcenter/dashboard/PerformanceSection.qml b/modules/controlcenter/dashboard/PerformanceSection.qml index ea6c68b3..9f14cc71 100644 --- a/modules/controlcenter/dashboard/PerformanceSection.qml +++ b/modules/controlcenter/dashboard/PerformanceSection.qml @@ -22,7 +22,7 @@ SectionContainer { StyledText { text: qsTr("Performance Resources") - font.pointSize: Tokens.font.size.normal + font: Tokens.font.title.small } ConnectedButtonGroup { diff --git a/modules/controlcenter/launcher/LauncherPane.qml b/modules/controlcenter/launcher/LauncherPane.qml index d6ac6f03..23d88874 100644 --- a/modules/controlcenter/launcher/LauncherPane.qml +++ b/modules/controlcenter/launcher/LauncherPane.qml @@ -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() } } } diff --git a/modules/controlcenter/notifications/NotificationsPane.qml b/modules/controlcenter/notifications/NotificationsPane.qml index 128ecbbe..90ccf25d 100644 --- a/modules/controlcenter/notifications/NotificationsPane.qml +++ b/modules/controlcenter/notifications/NotificationsPane.qml @@ -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 { diff --git a/modules/controlcenter/taskbar/TaskbarPane.qml b/modules/controlcenter/taskbar/TaskbarPane.qml index 48ccaaa1..5d816659 100644 --- a/modules/controlcenter/taskbar/TaskbarPane.qml +++ b/modules/controlcenter/taskbar/TaskbarPane.qml @@ -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 {