diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-28 21:46:55 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-28 21:46:55 +1000 |
| commit | 5c4de3016b516641297b79b88544cc74b0380aaa (patch) | |
| tree | 4c5113a95d244d9b856775291e8e23a4d86fa4ed /modules/dashboard | |
| parent | dashboard: loader content (diff) | |
| download | caelestia-shell-5c4de3016b516641297b79b88544cc74b0380aaa.tar.gz caelestia-shell-5c4de3016b516641297b79b88544cc74b0380aaa.tar.bz2 caelestia-shell-5c4de3016b516641297b79b88544cc74b0380aaa.zip | |
internal: use layouts for dashboard
Diffstat (limited to 'modules/dashboard')
| -rw-r--r-- | modules/dashboard/Content.qml | 9 | ||||
| -rw-r--r-- | modules/dashboard/Performance.qml | 24 |
2 files changed, 25 insertions, 8 deletions
diff --git a/modules/dashboard/Content.qml b/modules/dashboard/Content.qml index 5c90a17..33171e0 100644 --- a/modules/dashboard/Content.qml +++ b/modules/dashboard/Content.qml @@ -4,6 +4,7 @@ import "root:/config" import Quickshell import Quickshell.Widgets import QtQuick +import QtQuick.Layouts Item { id: root @@ -78,20 +79,24 @@ Item { contentX = Qt.binding(() => currentItem.x); } - Row { + RowLayout { id: row Dash { + Layout.alignment: Qt.AlignTop shouldUpdate: visible && this === view.currentItem visibilities: root.visibilities } Media { + Layout.alignment: Qt.AlignTop shouldUpdate: visible && this === view.currentItem visibilities: root.visibilities } - Performance {} + Performance { + Layout.alignment: Qt.AlignTop + } } Behavior on contentX { diff --git a/modules/dashboard/Performance.qml b/modules/dashboard/Performance.qml index b7bf8d0..0bc29d4 100644 --- a/modules/dashboard/Performance.qml +++ b/modules/dashboard/Performance.qml @@ -2,16 +2,21 @@ import "root:/widgets" import "root:/services" import "root:/config" import QtQuick +import QtQuick.Layouts -Row { +RowLayout { id: root + readonly property int padding: Appearance.padding.large + spacing: Appearance.spacing.large * 3 - padding: Appearance.padding.large - leftPadding: padding * 2 - rightPadding: padding * 3 Resource { + Layout.alignment: Qt.AlignVCenter + Layout.topMargin: root.padding + Layout.bottomMargin: root.padding + Layout.leftMargin: root.padding * 2 + value1: Math.min(1, SystemUsage.gpuTemp / 90) value2: SystemUsage.gpuPerc @@ -23,6 +28,10 @@ Row { } Resource { + Layout.alignment: Qt.AlignVCenter + Layout.topMargin: root.padding + Layout.bottomMargin: root.padding + primary: true value1: Math.min(1, SystemUsage.cpuTemp / 90) @@ -36,6 +45,11 @@ Row { } Resource { + Layout.alignment: Qt.AlignVCenter + Layout.topMargin: root.padding + Layout.bottomMargin: root.padding + Layout.rightMargin: root.padding * 3 + value1: SystemUsage.memPerc value2: SystemUsage.storagePerc @@ -72,8 +86,6 @@ Row { property color bg1: Colours.palette.m3primaryContainer property color bg2: Colours.palette.m3secondaryContainer - anchors.verticalCenter: parent.verticalCenter - implicitWidth: Config.dashboard.sizes.resourceSize * primaryMult implicitHeight: Config.dashboard.sizes.resourceSize * primaryMult |