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
+12 -6
View File
@@ -1,11 +1,13 @@
import QtQuick
import QtQuick.Layouts
import ZShell
import ZShell.Components
import ZShell.Config
import qs.Components
import qs.Services
import qs.Helpers
RowLayout {
SnapLayout {
id: root
spacing: Tokens.spacing.largeIncreased
@@ -20,7 +22,7 @@ RowLayout {
readonly property real markerX: {
const d = root.now;
return d.getHours() + d.getMinutes() / 60;
return ZUtils.snap(d.getHours() + d.getMinutes() / 60, root);
}
function formatHour(h) {
@@ -39,11 +41,13 @@ RowLayout {
onTriggered: root.now = new Date()
}
ColumnLayout {
SnapLayout {
orientation: Qt.Vertical
Layout.fillWidth: true
Layout.fillHeight: true
Layout.preferredWidth: root.width / 2
RowLayout {
SnapLayout {
Layout.fillWidth: true
MaterialIcon {
@@ -90,11 +94,13 @@ RowLayout {
}
}
ColumnLayout {
SnapLayout {
orientation: Qt.Vertical
Layout.fillWidth: true
Layout.fillHeight: true
Layout.preferredWidth: root.width / 2
RowLayout {
SnapLayout {
Layout.fillWidth: true
MaterialIcon {