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
+13 -6
View File
@@ -1,6 +1,8 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import ZShell
import ZShell.Components
import ZShell.Services
import ZShell.Config
import qs.Components
@@ -21,23 +23,26 @@ CustomRect {
service: Storage
}
ColumnLayout {
SnapLayout {
id: layout
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
spacing: 0
RowLayout {
spacing: 0
orientation: Qt.Vertical
SnapLayout {
id: row
Layout.alignment: Qt.AlignHCenter
spacing: Tokens.spacing.largeIncreased
CircularProgress {
fgColor: root.accent
implicitSize: usageColumn.implicitHeight + thickness + Tokens.padding.large * 2
implicitSize: ZUtils.snap(usageColumn.implicitHeight + thickness + Tokens.padding.large * 2, root)
startAngle: -225
sweepAngle: 270
value: root.percentage
@@ -46,7 +51,8 @@ CustomRect {
Anim {}
}
ColumnLayout {
SnapLayout {
orientation: Qt.Vertical
id: usageColumn
anchors.centerIn: parent
@@ -74,8 +80,9 @@ CustomRect {
}
}
ColumnLayout {
SnapLayout {
spacing: Tokens.spacing.extraSmall
orientation: Qt.Vertical
CustomText {
text: qsTr("Storage")