feat: initial commit for pixel-snapping components and helpers

This commit is contained in:
2026-10-29 17:34:57 +01:00
parent 9d8bde1413
commit 9cbb90f9e1
163 changed files with 2671 additions and 951 deletions
+14 -7
View File
@@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import ZShell.Config
import ZShell.Components
import qs.Components
import qs.Modules.Dashboard.Weather
import qs.Services
@@ -18,13 +19,14 @@ Item {
implicitHeight: layout.implicitHeight
Component.onCompleted: Weather.reload()
ColumnLayout {
SnapLayout {
orientation: Qt.Vertical
id: layout
anchors.fill: parent
spacing: Tokens.spacing.medium
RowLayout {
SnapLayout {
Layout.leftMargin: Tokens.padding.large
Layout.rightMargin: Tokens.padding.large
Layout.fillWidth: true
@@ -82,7 +84,7 @@ Item {
}
}
RowLayout {
SnapLayout {
Layout.fillWidth: true
spacing: Tokens.spacing.medium
@@ -121,7 +123,9 @@ Item {
color: Colors.palette.m3onSurface
}
RowLayout {
SnapLayout {
id: forecastLayout
Layout.fillWidth: true
spacing: Tokens.spacing.medium
@@ -137,12 +141,14 @@ Item {
required property var modelData
Layout.fillWidth: true
Layout.fillHeight: true
implicitHeight: forecastItemColumn.implicitHeight + Tokens.padding.medium * 2
radius: root.radius
color: Colors.tPalette.m3surfaceContainer
ColumnLayout {
SnapLayout {
orientation: Qt.Vertical
id: forecastItemColumn
anchors.centerIn: parent
@@ -196,7 +202,8 @@ Item {
property color colour
Layout.fillWidth: true
Layout.preferredHeight: 60
Layout.fillHeight: true
implicitHeight: 60
radius: Tokens.rounding.medium
color: Colors.tPalette.m3surfaceContainer
@@ -230,7 +237,7 @@ Item {
}
}
component WeatherStat: RowLayout {
component WeatherStat: SnapLayout {
id: weatherStat
property string icon