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
@@ -3,6 +3,7 @@ import QtQuick.Layouts
import Quickshell
import Quickshell.Widgets
import qs.Components
import ZShell.Components
import ZShell.Config
import qs.Services
@@ -57,22 +58,25 @@ Item {
Anim {}
}
ColumnLayout {
SnapLayout {
id: menuLayout
anchors.centerIn: parent
spacing: 0
orientation: Qt.Vertical
CustomRect {
Layout.preferredWidth: 160
implicitHeight: openRow.implicitHeight + Tokens.padding.extraSmall * 2
radius: popupBackground.radius - popupBackground.padding
RowLayout {
SnapLayout {
id: openRow
anchors.fill: parent
anchors.leftMargin: Tokens.padding.small
spacing: 8
MaterialIcon {
@@ -111,11 +115,12 @@ Item {
implicitHeight: openWithRow.implicitHeight + Tokens.padding.extraSmall * 2
radius: popupBackground.radius - popupBackground.padding
RowLayout {
SnapLayout {
id: openWithRow
anchors.fill: parent
anchors.leftMargin: Tokens.padding.small
spacing: 8
MaterialIcon {
@@ -156,11 +161,12 @@ Item {
implicitHeight: copyPathRow.implicitHeight + Tokens.padding.extraSmall * 2
radius: popupBackground.radius - popupBackground.padding
RowLayout {
SnapLayout {
id: copyPathRow
anchors.fill: parent
anchors.leftMargin: Tokens.padding.small
spacing: 8
MaterialIcon {
@@ -190,11 +196,12 @@ Item {
radius: popupBackground.radius - popupBackground.padding
visible: contextMenu.targetPaths.length === 1
RowLayout {
SnapLayout {
id: renameRow
anchors.fill: parent
anchors.leftMargin: Tokens.padding.small
spacing: 8
MaterialIcon {
@@ -231,11 +238,12 @@ Item {
implicitHeight: deleteRow.implicitHeight + Tokens.padding.extraSmall * 2
radius: popupBackground.radius - popupBackground.padding
RowLayout {
SnapLayout {
id: deleteRow
anchors.fill: parent
anchors.leftMargin: Tokens.padding.small
spacing: 8
MaterialIcon {