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
+24 -14
View File
@@ -9,6 +9,7 @@ import qs.Components
import qs.Services
import qs.Helpers
import qs.Daemons
import ZShell.Components
CustomRect {
id: root
@@ -52,8 +53,7 @@ CustomRect {
radius: Tokens.rounding.large
Behavior on implicitHeight {
Anim {
}
Anim {}
}
Component.onDestruction: {
@@ -61,13 +61,16 @@ CustomRect {
screenState.expandedNotifs.splice(screenState.expandedNotifs.indexOf(modelData), 1);
}
RowLayout {
SnapLayout {
id: content
anchors.left: parent.left
anchors.margins: Tokens.padding.small
anchors.right: parent.right
anchors.top: parent.top
objectName: "notif-content"
spacing: Tokens.spacing.medium
Item {
@@ -148,24 +151,29 @@ CustomRect {
}
}
Column {
SnapLayout {
id: column
Layout.fillWidth: true
spacing: root.expanded ? Math.round(Tokens.spacing.extraSmall) : 0
orientation: Qt.Vertical
objectName: "notif-column"
Behavior on spacing {
Anim {
}
Anim {}
}
RowLayout {
SnapLayout {
id: header
anchors.left: parent.left
anchors.right: parent.right
Layout.fillWidth: true
spacing: Tokens.spacing.small
objectName: "notif-header"
CustomText {
Layout.fillWidth: true
color: Colors.palette.m3onSurfaceVariant
@@ -191,12 +199,14 @@ CustomRect {
onClicked: root.toggleExpand(!root.expanded)
}
RowLayout {
SnapLayout {
id: expandBtn
anchors.centerIn: parent
spacing: Tokens.spacing.extraSmall
objectName: "notif-expand"
CustomText {
id: groupCount
@@ -214,12 +224,10 @@ CustomRect {
text: "expand_more"
Behavior on Layout.topMargin {
Anim {
}
Anim {}
}
Behavior on rotation {
Anim {
}
Anim {}
}
}
}
@@ -229,6 +237,8 @@ CustomRect {
NotifGroupList {
id: notifList
Layout.fillWidth: true
container: root.container
expanded: root.expanded
notifs: root.notifs