feat: initial commit for pixel-snapping components and helpers
This commit is contained in:
@@ -5,6 +5,7 @@ import Quickshell.Services.Pipewire
|
||||
import Quickshell.Widgets
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import ZShell.Components
|
||||
import QtQuick.Controls
|
||||
import ZShell.Config
|
||||
import qs.Components
|
||||
@@ -46,7 +47,8 @@ Item {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
component VolumesTab: ColumnLayout {
|
||||
component VolumesTab: SnapLayout {
|
||||
orientation: Qt.Vertical
|
||||
spacing: 12
|
||||
|
||||
CustomRect {
|
||||
@@ -56,14 +58,15 @@ Item {
|
||||
color: Colors.tPalette.m3surfaceContainer
|
||||
radius: root.rounding - vol.anchors.margins
|
||||
|
||||
ColumnLayout {
|
||||
SnapLayout {
|
||||
orientation: Qt.Vertical
|
||||
anchors.bottomMargin: Tokens.padding.small
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
anchors.topMargin: Tokens.padding.small
|
||||
|
||||
RowLayout {
|
||||
SnapLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -81,7 +84,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
SnapLayout {
|
||||
spacing: Tokens.spacing.largeIncreased
|
||||
|
||||
CustomMouseArea {
|
||||
@@ -153,14 +156,15 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
SnapLayout {
|
||||
orientation: Qt.Vertical
|
||||
anchors.bottomMargin: Tokens.padding.small
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
anchors.topMargin: Tokens.padding.small
|
||||
|
||||
RowLayout {
|
||||
SnapLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -178,7 +182,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
SnapLayout {
|
||||
spacing: Tokens.spacing.largeIncreased
|
||||
|
||||
CustomMouseArea {
|
||||
@@ -276,14 +280,15 @@ Item {
|
||||
text: Audio.getStreamName(appBox.modelData)
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
SnapLayout {
|
||||
orientation: Qt.Vertical
|
||||
anchors.bottomMargin: Tokens.padding.small
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
anchors.topMargin: Tokens.padding.small
|
||||
|
||||
RowLayout {
|
||||
SnapLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -302,7 +307,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
SnapLayout {
|
||||
spacing: Tokens.spacing.largeIncreased
|
||||
|
||||
CustomMouseArea {
|
||||
|
||||
@@ -4,6 +4,7 @@ import Quickshell
|
||||
import Quickshell.Networking
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import ZShell.Components
|
||||
import qs.Components
|
||||
import ZShell.Config
|
||||
import qs.Modules
|
||||
@@ -14,7 +15,8 @@ Item {
|
||||
|
||||
required property var wrapper
|
||||
|
||||
ColumnLayout {
|
||||
SnapLayout {
|
||||
orientation: Qt.Vertical
|
||||
id: layout
|
||||
|
||||
spacing: 8
|
||||
|
||||
@@ -4,6 +4,7 @@ import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import ZShell.Components
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Effects
|
||||
import qs.Components
|
||||
@@ -47,7 +48,8 @@ StackView {
|
||||
duration: 0
|
||||
}
|
||||
}
|
||||
component SubMenu: ColumnLayout {
|
||||
component SubMenu: SnapLayout {
|
||||
orientation: Qt.Vertical
|
||||
id: menu
|
||||
|
||||
required property QsMenuHandle handle
|
||||
|
||||
@@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import ZShell.Components
|
||||
import Quickshell.Services.UPower
|
||||
import ZShell.Config
|
||||
import qs.Modules.Bar.Components.Common
|
||||
@@ -35,7 +36,7 @@ Column {
|
||||
Repeater {
|
||||
model: Battery.allPeripherals
|
||||
|
||||
RowLayout {
|
||||
SnapLayout {
|
||||
id: layout
|
||||
|
||||
required property var modelData
|
||||
|
||||
@@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import ZShell.Components
|
||||
import Quickshell
|
||||
import ZShell.Config
|
||||
import qs.Components
|
||||
@@ -86,7 +87,7 @@ CustomRect {
|
||||
implicitWidth: 600
|
||||
radius: root.radius - Tokens.padding.extraSmall
|
||||
|
||||
RowLayout {
|
||||
SnapLayout {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Tokens.padding.small
|
||||
anchors.rightMargin: Tokens.padding.small
|
||||
@@ -96,7 +97,8 @@ CustomRect {
|
||||
text: "package_2"
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
SnapLayout {
|
||||
orientation: Qt.Vertical
|
||||
Layout.fillWidth: true
|
||||
|
||||
CustomText {
|
||||
@@ -114,7 +116,7 @@ CustomRect {
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
SnapLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: 300
|
||||
|
||||
|
||||
Reference in New Issue
Block a user