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
+6 -3
View File
@@ -3,11 +3,12 @@ pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import ZShell.Config
import ZShell.Components
import qs.Components
import qs.Helpers
import qs.Services
ColumnLayout {
SnapLayout {
id: root
readonly property real centerScale: Math.min(1, screenHeight / 1440)
@@ -18,9 +19,11 @@ ColumnLayout {
Layout.fillHeight: true
Layout.fillWidth: false
Layout.preferredWidth: centerWidth
orientation: Qt.Vertical
spacing: Tokens.spacing.largeIncreased * 2
RowLayout {
SnapLayout {
Layout.alignment: Qt.AlignHCenter
spacing: Tokens.spacing.small
@@ -116,7 +119,7 @@ ColumnLayout {
}
}
RowLayout {
SnapLayout {
id: input
anchors.fill: parent
+3 -2
View File
@@ -1,11 +1,12 @@
import QtQuick
import QtQuick.Layouts
import ZShell.Config
import ZShell.Components
import qs.Components
import qs.Helpers
import ZShell.Config
import qs.Services
RowLayout {
SnapLayout {
id: root
required property var greeter
+1
View File
@@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound
import Quickshell
import QtQuick
import QtQuick.Layouts
import ZShell.Components
import ZShell.Config
import qs.Components
import qs.Services
+10 -4
View File
@@ -3,17 +3,20 @@ pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import ZShell.Config
import ZShell.Components
import qs.Components
import qs.Services
ColumnLayout {
SnapLayout {
id: root
required property var greeter
anchors.fill: parent
anchors.margins: Tokens.padding.large
spacing: Tokens.spacing.large
orientation: Qt.Vertical
CustomText {
Layout.fillWidth: true
@@ -37,8 +40,9 @@ ColumnLayout {
duration: Tokens.anim.durations.extraLarge
}
}
sourceComponent: ColumnLayout {
sourceComponent: SnapLayout {
spacing: Tokens.spacing.largeIncreased
orientation: Qt.Vertical
MaterialIcon {
Layout.alignment: Qt.AlignHCenter
@@ -84,7 +88,7 @@ ColumnLayout {
}
}
RowLayout {
SnapLayout {
id: row
anchors.fill: parent
@@ -97,9 +101,11 @@ ColumnLayout {
text: modelData.kind === "x11" ? "tv" : "desktop_windows"
}
ColumnLayout {
SnapLayout {
Layout.fillWidth: true
spacing: Tokens.spacing.small / 2
orientation: Qt.Vertical
CustomText {
Layout.fillWidth: true
+10 -4
View File
@@ -3,18 +3,21 @@ pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import ZShell.Config
import ZShell.Components
import qs.Components
import qs.Helpers
import qs.Services
ColumnLayout {
SnapLayout {
id: root
required property var greeter
anchors.fill: parent
anchors.margins: Tokens.padding.large
spacing: Tokens.spacing.large
orientation: Qt.Vertical
CustomText {
Layout.fillWidth: true
@@ -38,8 +41,9 @@ ColumnLayout {
duration: Tokens.anim.durations.extraLarge
}
}
sourceComponent: ColumnLayout {
sourceComponent: SnapLayout {
spacing: Tokens.spacing.largeIncreased
orientation: Qt.Vertical
MaterialIcon {
Layout.alignment: Qt.AlignHCenter
@@ -86,7 +90,7 @@ ColumnLayout {
}
}
RowLayout {
SnapLayout {
id: row
anchors.fill: parent
@@ -112,9 +116,11 @@ ColumnLayout {
}
}
ColumnLayout {
SnapLayout {
Layout.fillWidth: true
spacing: Tokens.spacing.small / 2
orientation: Qt.Vertical
CustomText {
Layout.fillWidth: true