From 7cb3944af734beaf53e2734c123eb11f7cc7721d Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Mon, 20 Apr 2026 19:58:21 +1000 Subject: [PATCH] refactor: replace scaled spacing with new tokens --- components/ConnectionInfoSection.qml | 2 +- components/PropertyRow.qml | 2 +- components/controls/CollapsibleSection.qml | 2 +- components/controls/SplitButton.qml | 2 +- components/filedialog/FolderContents.qml | 2 +- components/filedialog/Sidebar.qml | 2 +- modules/bar/components/workspaces/Workspaces.qml | 2 +- modules/bar/popouts/Audio.qml | 2 +- modules/bar/popouts/Bluetooth.qml | 4 ++-- modules/bar/popouts/Network.qml | 8 ++++---- modules/bar/popouts/TrayMenu.qml | 2 +- modules/bar/popouts/WirelessPassword.qml | 2 +- modules/controlcenter/NavRail.qml | 2 +- .../appearance/sections/ColorSchemeSection.qml | 2 +- .../appearance/sections/ColorVariantSection.qml | 2 +- .../controlcenter/appearance/sections/FontsSection.qml | 6 +++--- modules/controlcenter/bluetooth/Details.qml | 6 +++--- modules/controlcenter/bluetooth/Settings.qml | 2 +- modules/controlcenter/components/DeviceList.qml | 2 +- modules/controlcenter/launcher/LauncherPane.qml | 2 +- modules/controlcenter/launcher/Settings.qml | 8 ++++---- modules/controlcenter/network/EthernetDetails.qml | 2 +- modules/controlcenter/network/EthernetSettings.qml | 2 +- modules/controlcenter/network/NetworkSettings.qml | 4 ++-- modules/controlcenter/network/VpnDetails.qml | 2 +- modules/controlcenter/network/WirelessDetails.qml | 2 +- modules/controlcenter/network/WirelessPasswordDialog.qml | 2 +- modules/controlcenter/network/WirelessSettings.qml | 2 +- modules/dashboard/WeatherTab.qml | 4 ++-- modules/launcher/items/WallpaperItem.qml | 4 ++-- modules/lock/InputField.qml | 2 +- modules/lock/NotifGroup.qml | 4 ++-- modules/sidebar/Notif.qml | 2 +- modules/sidebar/NotifGroup.qml | 6 +++--- modules/sidebar/NotifGroupList.qml | 2 +- modules/utilities/cards/RecordingList.qml | 4 ++-- 36 files changed, 54 insertions(+), 54 deletions(-) diff --git a/components/ConnectionInfoSection.qml b/components/ConnectionInfoSection.qml index ed8ef887..795e90d0 100644 --- a/components/ConnectionInfoSection.qml +++ b/components/ConnectionInfoSection.qml @@ -9,7 +9,7 @@ ColumnLayout { required property var deviceDetails - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall StyledText { text: qsTr("IP Address") diff --git a/components/PropertyRow.qml b/components/PropertyRow.qml index b00881ba..d9524b75 100644 --- a/components/PropertyRow.qml +++ b/components/PropertyRow.qml @@ -11,7 +11,7 @@ ColumnLayout { required property string value property bool showTopMargin: false - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall StyledText { Layout.topMargin: root.showTopMargin ? Tokens.spacing.medium : 0 diff --git a/components/controls/CollapsibleSection.qml b/components/controls/CollapsibleSection.qml index 4136aa87..ddfa1be8 100644 --- a/components/controls/CollapsibleSection.qml +++ b/components/controls/CollapsibleSection.qml @@ -76,7 +76,7 @@ ColumnLayout { id: contentWrapper Layout.fillWidth: true - Layout.preferredHeight: root.expanded ? (contentColumn.implicitHeight + Tokens.spacing.small * 2) : 0 + Layout.preferredHeight: root.expanded ? (contentColumn.implicitHeight + Tokens.spacing.large) : 0 clip: true Behavior on Layout.preferredHeight { diff --git a/components/controls/SplitButton.qml b/components/controls/SplitButton.qml index 970f96e4..37cc89fa 100644 --- a/components/controls/SplitButton.qml +++ b/components/controls/SplitButton.qml @@ -33,7 +33,7 @@ Row { property color disabledColour: Qt.alpha(Colours.palette.m3onSurface, 0.1) property color disabledTextColour: Qt.alpha(Colours.palette.m3onSurface, 0.38) - spacing: Math.floor(Tokens.spacing.small / 2) + spacing: Math.floor(Tokens.spacing.extraSmall) StyledRect { radius: implicitHeight / 2 * Math.min(1, Tokens.rounding.scale) diff --git a/components/filedialog/FolderContents.qml b/components/filedialog/FolderContents.qml index 211cffb1..43d63c02 100644 --- a/components/filedialog/FolderContents.qml +++ b/components/filedialog/FolderContents.qml @@ -83,7 +83,7 @@ Item { anchors.margins: Tokens.padding.extraSmall + Tokens.padding.medium cellWidth: Sizes.itemWidth + Tokens.spacing.small - cellHeight: Sizes.itemWidth + Tokens.spacing.small * 2 + Tokens.padding.medium * 2 + 1 + cellHeight: Sizes.itemWidth + Tokens.spacing.large + Tokens.padding.medium * 2 + 1 clip: true focus: true diff --git a/components/filedialog/Sidebar.qml b/components/filedialog/Sidebar.qml index f6a0e374..7adf8949 100644 --- a/components/filedialog/Sidebar.qml +++ b/components/filedialog/Sidebar.qml @@ -24,7 +24,7 @@ StyledRect { anchors.right: parent.right anchors.top: parent.top anchors.margins: Tokens.padding.medium - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall StyledText { Layout.alignment: Qt.AlignHCenter diff --git a/modules/bar/components/workspaces/Workspaces.qml b/modules/bar/components/workspaces/Workspaces.qml index 62e46f8a..91f6d0f1 100644 --- a/modules/bar/components/workspaces/Workspaces.qml +++ b/modules/bar/components/workspaces/Workspaces.qml @@ -64,7 +64,7 @@ StyledClippingRect { id: layout anchors.centerIn: parent - spacing: Math.floor(Tokens.spacing.small / 2) + spacing: Math.floor(Tokens.spacing.extraSmall) Repeater { id: workspaces diff --git a/modules/bar/popouts/Audio.qml b/modules/bar/popouts/Audio.qml index 7b24fb0e..d558a105 100644 --- a/modules/bar/popouts/Audio.qml +++ b/modules/bar/popouts/Audio.qml @@ -73,7 +73,7 @@ Item { StyledText { Layout.topMargin: Tokens.spacing.medium - Layout.bottomMargin: -Tokens.spacing.small / 2 + Layout.bottomMargin: -Tokens.spacing.extraSmall text: qsTr("Volume (%1)").arg(Audio.muted ? qsTr("Muted") : `${Math.round(Audio.volume * 100)}%`) font.weight: 500 } diff --git a/modules/bar/popouts/Bluetooth.qml b/modules/bar/popouts/Bluetooth.qml index 4012ea27..dd49ebe5 100644 --- a/modules/bar/popouts/Bluetooth.qml +++ b/modules/bar/popouts/Bluetooth.qml @@ -96,8 +96,8 @@ ColumnLayout { } StyledText { - Layout.leftMargin: Tokens.spacing.small / 2 - Layout.rightMargin: Tokens.spacing.small / 2 + Layout.leftMargin: Tokens.spacing.extraSmall + Layout.rightMargin: Tokens.spacing.extraSmall Layout.fillWidth: true text: device.modelData.name elide: Text.ElideRight diff --git a/modules/bar/popouts/Network.qml b/modules/bar/popouts/Network.qml index 93614ea0..0ca63c30 100644 --- a/modules/bar/popouts/Network.qml +++ b/modules/bar/popouts/Network.qml @@ -101,8 +101,8 @@ ColumnLayout { } StyledText { - Layout.leftMargin: Tokens.spacing.small / 2 - Layout.rightMargin: Tokens.spacing.small / 2 + Layout.leftMargin: Tokens.spacing.extraSmall + Layout.rightMargin: Tokens.spacing.extraSmall Layout.fillWidth: true text: networkItem.modelData.ssid elide: Text.ElideRight @@ -278,8 +278,8 @@ ColumnLayout { } StyledText { - Layout.leftMargin: Tokens.spacing.small / 2 - Layout.rightMargin: Tokens.spacing.small / 2 + Layout.leftMargin: Tokens.spacing.extraSmall + Layout.rightMargin: Tokens.spacing.extraSmall Layout.fillWidth: true text: ethernetItem.modelData.interface || qsTr("Unknown") elide: Text.ElideRight diff --git a/modules/bar/popouts/TrayMenu.qml b/modules/bar/popouts/TrayMenu.qml index fd9eba9e..e707521d 100644 --- a/modules/bar/popouts/TrayMenu.qml +++ b/modules/bar/popouts/TrayMenu.qml @@ -180,7 +180,7 @@ StackView { sourceComponent: Item { implicitWidth: back.implicitWidth - implicitHeight: back.implicitHeight + Tokens.spacing.small / 2 + implicitHeight: back.implicitHeight + Tokens.spacing.extraSmall Item { anchors.bottom: parent.bottom diff --git a/modules/bar/popouts/WirelessPassword.qml b/modules/bar/popouts/WirelessPassword.qml index daa38ae3..c06e8f7d 100644 --- a/modules/bar/popouts/WirelessPassword.qml +++ b/modules/bar/popouts/WirelessPassword.qml @@ -394,7 +394,7 @@ ColumnLayout { implicitHeight: Tokens.font.size.normal orientation: Qt.Horizontal - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall interactive: false model: ScriptModel { diff --git a/modules/controlcenter/NavRail.qml b/modules/controlcenter/NavRail.qml index 9e26cdd0..2c1aa149 100644 --- a/modules/controlcenter/NavRail.qml +++ b/modules/controlcenter/NavRail.qml @@ -219,7 +219,7 @@ Item { anchors.horizontalCenter: icon.horizontalCenter anchors.top: icon.bottom - anchors.topMargin: Tokens.spacing.small / 2 + anchors.topMargin: Tokens.spacing.extraSmall text: item.label font.pointSize: Tokens.font.size.small diff --git a/modules/controlcenter/appearance/sections/ColorSchemeSection.qml b/modules/controlcenter/appearance/sections/ColorSchemeSection.qml index 414777b1..f28651b5 100644 --- a/modules/controlcenter/appearance/sections/ColorSchemeSection.qml +++ b/modules/controlcenter/appearance/sections/ColorSchemeSection.qml @@ -18,7 +18,7 @@ CollapsibleSection { ColumnLayout { Layout.fillWidth: true - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall Repeater { model: Schemes.list diff --git a/modules/controlcenter/appearance/sections/ColorVariantSection.qml b/modules/controlcenter/appearance/sections/ColorVariantSection.qml index 54fa62e1..656ae9e5 100644 --- a/modules/controlcenter/appearance/sections/ColorVariantSection.qml +++ b/modules/controlcenter/appearance/sections/ColorVariantSection.qml @@ -18,7 +18,7 @@ CollapsibleSection { ColumnLayout { Layout.fillWidth: true - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall Repeater { model: M3Variants.list diff --git a/modules/controlcenter/appearance/sections/FontsSection.qml b/modules/controlcenter/appearance/sections/FontsSection.qml index 9dfadb65..de0c8eaa 100644 --- a/modules/controlcenter/appearance/sections/FontsSection.qml +++ b/modules/controlcenter/appearance/sections/FontsSection.qml @@ -38,7 +38,7 @@ CollapsibleSection { property alias contentHeight: sansFontList.contentHeight clip: true - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall model: Qt.fontFamilies() StyledScrollBar.vertical: StyledScrollBar { @@ -119,7 +119,7 @@ CollapsibleSection { property alias contentHeight: monoFontList.contentHeight clip: true - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall model: Qt.fontFamilies() StyledScrollBar.vertical: StyledScrollBar { @@ -202,7 +202,7 @@ CollapsibleSection { property alias contentHeight: materialFontList.contentHeight clip: true - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall model: Qt.fontFamilies().filter(f => f.startsWith("Material Symbols")) StyledScrollBar.vertical: StyledScrollBar { diff --git a/modules/controlcenter/bluetooth/Details.qml b/modules/controlcenter/bluetooth/Details.qml index bed5c19a..2210e5af 100644 --- a/modules/controlcenter/bluetooth/Details.qml +++ b/modules/controlcenter/bluetooth/Details.qml @@ -348,7 +348,7 @@ StyledFlickable { anchors.verticalCenter: parent.verticalCenter anchors.margins: Tokens.padding.large - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall StyledText { text: root.device?.batteryAvailable ? qsTr("Device battery (%1%)").arg(root.device.battery * 100) : qsTr("Battery unavailable") @@ -357,10 +357,10 @@ StyledFlickable { RowLayout { id: batteryPercent - Layout.topMargin: Tokens.spacing.small / 2 + Layout.topMargin: Tokens.spacing.extraSmall Layout.fillWidth: true Layout.preferredHeight: Tokens.padding.small - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall StyledRect { Layout.fillWidth: true diff --git a/modules/controlcenter/bluetooth/Settings.qml b/modules/controlcenter/bluetooth/Settings.qml index fff80162..78c6df31 100644 --- a/modules/controlcenter/bluetooth/Settings.qml +++ b/modules/controlcenter/bluetooth/Settings.qml @@ -468,7 +468,7 @@ ColumnLayout { anchors.verticalCenter: parent.verticalCenter anchors.margins: Tokens.padding.large - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall StyledText { text: qsTr("Adapter state") diff --git a/modules/controlcenter/components/DeviceList.qml b/modules/controlcenter/components/DeviceList.qml index f02cc3c0..d9f95216 100644 --- a/modules/controlcenter/components/DeviceList.qml +++ b/modules/controlcenter/components/DeviceList.qml @@ -78,7 +78,7 @@ ColumnLayout { model: root.model delegate: root.delegate - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall interactive: false clip: false } diff --git a/modules/controlcenter/launcher/LauncherPane.qml b/modules/controlcenter/launcher/LauncherPane.qml index fa74da94..d6ac6f03 100644 --- a/modules/controlcenter/launcher/LauncherPane.qml +++ b/modules/controlcenter/launcher/LauncherPane.qml @@ -296,7 +296,7 @@ Item { Layout.fillHeight: true model: root.filteredApps - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall clip: true StyledScrollBar.vertical: StyledScrollBar { diff --git a/modules/controlcenter/launcher/Settings.qml b/modules/controlcenter/launcher/Settings.qml index 258c8dcf..5d7581ea 100644 --- a/modules/controlcenter/launcher/Settings.qml +++ b/modules/controlcenter/launcher/Settings.qml @@ -69,7 +69,7 @@ ColumnLayout { } SectionContainer { - contentSpacing: Tokens.spacing.small / 2 + contentSpacing: Tokens.spacing.extraSmall PropertyRow { label: qsTr("Max shown items") @@ -96,7 +96,7 @@ ColumnLayout { } SectionContainer { - contentSpacing: Tokens.spacing.small / 2 + contentSpacing: Tokens.spacing.extraSmall PropertyRow { label: qsTr("Special prefix") @@ -165,7 +165,7 @@ ColumnLayout { } SectionContainer { - contentSpacing: Tokens.spacing.small / 2 + contentSpacing: Tokens.spacing.extraSmall PropertyRow { label: qsTr("Item width") @@ -198,7 +198,7 @@ ColumnLayout { } SectionContainer { - contentSpacing: Tokens.spacing.small / 2 + contentSpacing: Tokens.spacing.extraSmall PropertyRow { label: qsTr("Total hidden") diff --git a/modules/controlcenter/network/EthernetDetails.qml b/modules/controlcenter/network/EthernetDetails.qml index 8d63c698..e6d588c2 100644 --- a/modules/controlcenter/network/EthernetDetails.qml +++ b/modules/controlcenter/network/EthernetDetails.qml @@ -77,7 +77,7 @@ DeviceDetails { } SectionContainer { - contentSpacing: Tokens.spacing.small / 2 + contentSpacing: Tokens.spacing.extraSmall PropertyRow { label: qsTr("Interface") diff --git a/modules/controlcenter/network/EthernetSettings.qml b/modules/controlcenter/network/EthernetSettings.qml index 46aa26cb..da89615c 100644 --- a/modules/controlcenter/network/EthernetSettings.qml +++ b/modules/controlcenter/network/EthernetSettings.qml @@ -49,7 +49,7 @@ ColumnLayout { anchors.verticalCenter: parent.verticalCenter anchors.margins: Tokens.padding.large - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall StyledText { text: qsTr("Total devices") diff --git a/modules/controlcenter/network/NetworkSettings.qml b/modules/controlcenter/network/NetworkSettings.qml index b0e0e24a..f2a1132d 100644 --- a/modules/controlcenter/network/NetworkSettings.qml +++ b/modules/controlcenter/network/NetworkSettings.qml @@ -31,7 +31,7 @@ ColumnLayout { } SectionContainer { - contentSpacing: Tokens.spacing.small / 2 + contentSpacing: Tokens.spacing.extraSmall PropertyRow { label: qsTr("Total devices") @@ -106,7 +106,7 @@ ColumnLayout { } SectionContainer { - contentSpacing: Tokens.spacing.small / 2 + contentSpacing: Tokens.spacing.extraSmall PropertyRow { label: qsTr("Network") diff --git a/modules/controlcenter/network/VpnDetails.qml b/modules/controlcenter/network/VpnDetails.qml index 0987b28c..9809968a 100644 --- a/modules/controlcenter/network/VpnDetails.qml +++ b/modules/controlcenter/network/VpnDetails.qml @@ -181,7 +181,7 @@ DeviceDetails { } SectionContainer { - contentSpacing: Tokens.spacing.small / 2 + contentSpacing: Tokens.spacing.extraSmall PropertyRow { label: qsTr("Provider") diff --git a/modules/controlcenter/network/WirelessDetails.qml b/modules/controlcenter/network/WirelessDetails.qml index cc686a3e..6008b30a 100644 --- a/modules/controlcenter/network/WirelessDetails.qml +++ b/modules/controlcenter/network/WirelessDetails.qml @@ -120,7 +120,7 @@ DeviceDetails { } SectionContainer { - contentSpacing: Tokens.spacing.small / 2 + contentSpacing: Tokens.spacing.extraSmall PropertyRow { label: qsTr("SSID") diff --git a/modules/controlcenter/network/WirelessPasswordDialog.qml b/modules/controlcenter/network/WirelessPasswordDialog.qml index 8992d586..f8e18743 100644 --- a/modules/controlcenter/network/WirelessPasswordDialog.qml +++ b/modules/controlcenter/network/WirelessPasswordDialog.qml @@ -321,7 +321,7 @@ Item { implicitHeight: Tokens.font.size.normal orientation: Qt.Horizontal - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall interactive: false model: ScriptModel { diff --git a/modules/controlcenter/network/WirelessSettings.qml b/modules/controlcenter/network/WirelessSettings.qml index d5e5cc45..bf55497a 100644 --- a/modules/controlcenter/network/WirelessSettings.qml +++ b/modules/controlcenter/network/WirelessSettings.qml @@ -45,7 +45,7 @@ ColumnLayout { } SectionContainer { - contentSpacing: Tokens.spacing.small / 2 + contentSpacing: Tokens.spacing.extraSmall PropertyRow { label: qsTr("Connected network") diff --git a/modules/dashboard/WeatherTab.qml b/modules/dashboard/WeatherTab.qml index ab9fc47a..50b60bab 100644 --- a/modules/dashboard/WeatherTab.qml +++ b/modules/dashboard/WeatherTab.qml @@ -25,7 +25,7 @@ Item { Layout.fillWidth: true Column { - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall StyledText { text: Weather.city || qsTr("Loading...") @@ -176,7 +176,7 @@ Item { } StyledText { - Layout.topMargin: -Tokens.spacing.small / 2 + Layout.topMargin: -Tokens.spacing.extraSmall Layout.alignment: Qt.AlignHCenter text: new Date(forecastItem.modelData.date).toLocaleDateString(Qt.locale(), "MMM d") font.pointSize: Tokens.font.size.small diff --git a/modules/launcher/items/WallpaperItem.qml b/modules/launcher/items/WallpaperItem.qml index 21ac3ad1..2f3841dc 100644 --- a/modules/launcher/items/WallpaperItem.qml +++ b/modules/launcher/items/WallpaperItem.qml @@ -22,7 +22,7 @@ Item { } implicitWidth: image.width + Tokens.padding.medium * 2 - implicitHeight: image.height + label.height + Tokens.spacing.small / 2 + Tokens.padding.large + Tokens.padding.medium + implicitHeight: image.height + label.height + Tokens.spacing.extraSmall + Tokens.padding.large + Tokens.padding.medium StateLayer { radius: Tokens.rounding.large @@ -75,7 +75,7 @@ Item { id: label anchors.top: image.bottom - anchors.topMargin: Tokens.spacing.small / 2 + anchors.topMargin: Tokens.spacing.extraSmall anchors.horizontalCenter: parent.horizontalCenter width: image.width - Tokens.padding.medium * 2 diff --git a/modules/lock/InputField.qml b/modules/lock/InputField.qml index 94ccffff..a63ed187 100644 --- a/modules/lock/InputField.qml +++ b/modules/lock/InputField.qml @@ -77,7 +77,7 @@ Item { implicitHeight: Tokens.font.size.normal orientation: Qt.Horizontal - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall interactive: false model: ScriptModel { diff --git a/modules/lock/NotifGroup.qml b/modules/lock/NotifGroup.qml index 8d10fbc9..5770b4b6 100644 --- a/modules/lock/NotifGroup.qml +++ b/modules/lock/NotifGroup.qml @@ -143,7 +143,7 @@ StyledRect { Layout.topMargin: -Tokens.padding.extraSmall Layout.bottomMargin: -Tokens.padding.extraSmall / 2 - (root.expanded ? 0 : spacing) Layout.fillWidth: true - spacing: Math.round(Tokens.spacing.small / 2) + spacing: Math.round(Tokens.spacing.extraSmall) RowLayout { Layout.bottomMargin: -parent.spacing @@ -184,7 +184,7 @@ StyledRect { id: expandBtn anchors.centerIn: parent - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall StyledText { id: groupCount diff --git a/modules/sidebar/Notif.qml b/modules/sidebar/Notif.qml index 05f61c35..054ff61c 100644 --- a/modules/sidebar/Notif.qml +++ b/modules/sidebar/Notif.qml @@ -117,7 +117,7 @@ StyledRect { anchors.top: summary.bottom anchors.left: parent.left anchors.right: parent.right - anchors.topMargin: Tokens.spacing.small / 2 + anchors.topMargin: Tokens.spacing.extraSmall sourceComponent: ExpandedBody {} } diff --git a/modules/sidebar/NotifGroup.qml b/modules/sidebar/NotifGroup.qml index 38cb4093..b1d61cad 100644 --- a/modules/sidebar/NotifGroup.qml +++ b/modules/sidebar/NotifGroup.qml @@ -32,7 +32,7 @@ StyledRect { } readonly property int nonAnimHeight: { - const headerHeight = header.implicitHeight + (root.expanded ? Math.round(Tokens.spacing.small / 2) : 0); + const headerHeight = header.implicitHeight + (root.expanded ? Math.round(Tokens.spacing.extraSmall) : 0); const columnHeight = headerHeight + notifList.layoutHeight; return Math.round(Math.max(TokenConfig.sizes.notifs.image, columnHeight) + Tokens.padding.medium * 2); } @@ -157,7 +157,7 @@ StyledRect { id: column Layout.fillWidth: true - spacing: root.expanded ? Math.round(Tokens.spacing.small / 2) : 0 + spacing: root.expanded ? Math.round(Tokens.spacing.extraSmall) : 0 Behavior on spacing { Anim {} @@ -201,7 +201,7 @@ StyledRect { id: expandBtn anchors.centerIn: parent - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall StyledText { id: groupCount diff --git a/modules/sidebar/NotifGroupList.qml b/modules/sidebar/NotifGroupList.qml index 72b8b3a8..0dabfbe0 100644 --- a/modules/sidebar/NotifGroupList.qml +++ b/modules/sidebar/NotifGroupList.qml @@ -22,7 +22,7 @@ LazyListView { anchors.right: parent.right implicitHeight: contentHeight - spacing: Math.round(Tokens.spacing.small / 2) + spacing: Math.round(Tokens.spacing.extraSmall) asynchronous: true readyDelay: 1 diff --git a/modules/utilities/cards/RecordingList.qml b/modules/utilities/cards/RecordingList.qml index b96fb3f2..1b5b31c9 100644 --- a/modules/utilities/cards/RecordingList.qml +++ b/modules/utilities/cards/RecordingList.qml @@ -78,13 +78,13 @@ ColumnLayout { anchors.left: list.contentItem.left anchors.right: list.contentItem.right anchors.rightMargin: Tokens.spacing.small - spacing: Tokens.spacing.small / 2 + spacing: Tokens.spacing.extraSmall Component.onCompleted: baseName = modelData.baseName StyledText { Layout.fillWidth: true - Layout.rightMargin: Tokens.spacing.small / 2 + Layout.rightMargin: Tokens.spacing.extraSmall text: { const time = recording.baseName; const matches = time.match(/^recording_(\d{4})(\d{2})(\d{2})_(\d{2})-(\d{2})-(\d{2})/);