feat: initial commit for pixel-snapping components and helpers
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import ZShell.Components
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Hyprland
|
||||
@@ -43,7 +44,8 @@ Item {
|
||||
}
|
||||
opacity: root.visible ? 1 : 0
|
||||
|
||||
ColumnLayout {
|
||||
SnapLayout {
|
||||
orientation: Qt.Vertical
|
||||
id: menuLayout
|
||||
anchors.centerIn: parent
|
||||
spacing: 0
|
||||
@@ -53,7 +55,7 @@ Item {
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
implicitHeight: openTerminalRow.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
|
||||
RowLayout {
|
||||
SnapLayout {
|
||||
id: openTerminalRow
|
||||
spacing: 8
|
||||
anchors.fill: parent
|
||||
@@ -92,7 +94,7 @@ Item {
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
implicitHeight: settingsRow.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
|
||||
RowLayout {
|
||||
SnapLayout {
|
||||
id: settingsRow
|
||||
spacing: 8
|
||||
anchors.fill: parent
|
||||
@@ -132,7 +134,7 @@ Item {
|
||||
radius: popupBackground.radius - popupBackground.padding
|
||||
implicitHeight: logoutRow.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
|
||||
RowLayout {
|
||||
SnapLayout {
|
||||
id: logoutRow
|
||||
spacing: 8
|
||||
anchors.fill: parent
|
||||
@@ -171,7 +173,7 @@ Item {
|
||||
// radius: popupBackground.radius - popupBackground.padding
|
||||
// implicitHeight: desktopIconsRow.implicitHeight + Tokens.padding.extraSmall * 2
|
||||
//
|
||||
// RowLayout {
|
||||
// SnapLayout {
|
||||
// id: desktopIconsRow
|
||||
// spacing: 8
|
||||
// anchors.fill: parent
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user