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
+4 -2
View File
@@ -4,6 +4,7 @@ import Quickshell
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import ZShell.Components
import qs.Components
import ZShell.Config
import qs.Services
@@ -117,14 +118,15 @@ CustomMouseArea {
}
}
ColumnLayout {
SnapLayout {
orientation: Qt.Vertical
id: inner
anchors.fill: parent
anchors.margins: Tokens.padding.large
spacing: Tokens.spacing.extraSmall
RowLayout {
SnapLayout {
id: monthNavigationRow
Layout.fillWidth: true
+11 -9
View File
@@ -1,5 +1,7 @@
import QtQuick
import QtQuick.Layouts
import ZShell.Components
import ZShell
import ZShell.Services
import ZShell.Config
import qs.Components
@@ -8,9 +10,8 @@ import qs.Services
Item {
id: root
anchors.bottom: parent.bottom
anchors.top: parent.top
implicitWidth: layout.implicitWidth + layout.anchors.margins * 4
anchors.fill: parent
implicitWidth: ZUtils.snap(layout.implicitWidth + layout.anchors.margins * 2, root)
ServiceRef {
service: Storage
@@ -28,13 +29,16 @@ Item {
service: Gpu
}
ColumnLayout {
SnapLayout {
orientation: Qt.Vertical
id: layout
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.margins: Tokens.padding.large
anchors.top: parent.top
x: ZUtils.snap((root.width - implicitWidth) / 2, root)
spacing: Tokens.spacing.medium
Resource {
@@ -73,12 +77,10 @@ Item {
required property string icon
Layout.fillHeight: true
implicitSize: height
implicitSize: ZUtils.snap((root.height - layout.anchors.margins * 2 - layout.spacing * 4) / 5, root)
Behavior on clampedVal {
Anim {
}
Anim {}
}
MaterialIcon {