config moved to c++ plugin, removed old qml + fileview implementation
This commit is contained in:
+27
-26
@@ -4,7 +4,8 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Components
|
||||
import qs.Helpers
|
||||
import qs.Config
|
||||
import ZShell.Config
|
||||
import qs.Services
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
@@ -12,12 +13,12 @@ ColumnLayout {
|
||||
required property var greeter
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.large
|
||||
spacing: Appearance.spacing.smaller
|
||||
anchors.margins: Tokens.padding.large
|
||||
spacing: Tokens.spacing.smaller
|
||||
|
||||
CustomText {
|
||||
Layout.fillWidth: true
|
||||
color: DynamicColors.palette.m3outline
|
||||
color: Colors.palette.m3outline
|
||||
elide: Text.ElideRight
|
||||
font.family: Appearance.font.family.mono
|
||||
font.weight: 500
|
||||
@@ -28,7 +29,7 @@ ColumnLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
color: "transparent"
|
||||
radius: Appearance.rounding.small
|
||||
radius: Tokens.rounding.small
|
||||
|
||||
Loader {
|
||||
active: opacity > 0
|
||||
@@ -37,25 +38,25 @@ ColumnLayout {
|
||||
|
||||
Behavior on opacity {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.extraLarge
|
||||
duration: Tokens.anim.durations.extraLarge
|
||||
}
|
||||
}
|
||||
sourceComponent: ColumnLayout {
|
||||
spacing: Appearance.spacing.large
|
||||
spacing: Tokens.spacing.large
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
color: DynamicColors.palette.m3outlineVariant
|
||||
color: Colors.palette.m3outlineVariant
|
||||
fill: 1
|
||||
font.pointSize: Appearance.font.size.extraLarge * 2
|
||||
font.pointSize: Tokens.font.size.extraLarge * 2
|
||||
text: "account_circle"
|
||||
}
|
||||
|
||||
CustomText {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
color: DynamicColors.palette.m3outlineVariant
|
||||
color: Colors.palette.m3outlineVariant
|
||||
font.family: Appearance.font.family.mono
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.pointSize: Tokens.font.size.large
|
||||
font.weight: 500
|
||||
text: qsTr("No Users Found")
|
||||
}
|
||||
@@ -70,7 +71,7 @@ ColumnLayout {
|
||||
currentIndex: root.greeter.selectedUser ? root.greeter.users.indexOf(root.greeter.selectedUser) : -1
|
||||
highlightFollowsCurrentItem: false
|
||||
model: root.greeter.users
|
||||
spacing: Appearance.spacing.small
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
delegate: CustomRect {
|
||||
id: user
|
||||
@@ -80,8 +81,8 @@ ColumnLayout {
|
||||
|
||||
anchors.left: parent?.left
|
||||
anchors.right: parent?.right
|
||||
implicitHeight: row.implicitHeight + Appearance.padding.normal * 2
|
||||
radius: Appearance.rounding.normal - Appearance.padding.smaller
|
||||
implicitHeight: row.implicitHeight + Tokens.padding.normal * 2
|
||||
radius: Tokens.rounding.normal - Tokens.padding.smaller
|
||||
|
||||
StateLayer {
|
||||
onClicked: {
|
||||
@@ -93,19 +94,19 @@ ColumnLayout {
|
||||
id: row
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.normal
|
||||
spacing: Appearance.spacing.normal
|
||||
anchors.margins: Tokens.padding.normal
|
||||
spacing: Tokens.spacing.normal
|
||||
|
||||
CustomClippingRect {
|
||||
Layout.preferredHeight: 50
|
||||
Layout.preferredWidth: 50
|
||||
radius: Appearance.rounding.full
|
||||
radius: Tokens.rounding.full
|
||||
|
||||
MaterialIcon {
|
||||
anchors.centerIn: parent
|
||||
color: user.index === users.currentIndex ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurfaceVariant
|
||||
color: user.index === users.currentIndex ? Colors.palette.m3onPrimary : Colors.palette.m3onSurfaceVariant
|
||||
fill: 1
|
||||
font.pointSize: Appearance.font.size.extraLarge
|
||||
font.pointSize: Tokens.font.size.extraLarge
|
||||
text: modelData.kind === "x11" ? "tv" : "account_circle"
|
||||
}
|
||||
|
||||
@@ -117,13 +118,13 @@ ColumnLayout {
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Appearance.spacing.small / 2
|
||||
spacing: Tokens.spacing.small / 2
|
||||
|
||||
CustomText {
|
||||
Layout.fillWidth: true
|
||||
color: user.index === users.currentIndex ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
|
||||
color: user.index === users.currentIndex ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
font.pointSize: Tokens.font.size.normal
|
||||
font.weight: 600
|
||||
text: modelData.username
|
||||
}
|
||||
@@ -131,16 +132,16 @@ ColumnLayout {
|
||||
}
|
||||
}
|
||||
highlight: CustomRect {
|
||||
color: DynamicColors.palette.m3primary
|
||||
color: Colors.palette.m3primary
|
||||
implicitHeight: users.currentItem?.implicitHeight ?? 0
|
||||
implicitWidth: users.width
|
||||
radius: Appearance.rounding.normal - Appearance.padding.smaller
|
||||
radius: Tokens.rounding.normal - Tokens.padding.smaller
|
||||
y: users.currentItem?.y ?? 0
|
||||
|
||||
Behavior on y {
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.small
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveEffects
|
||||
duration: Tokens.anim.durations.small
|
||||
easing.bezierCurve: Tokens.anim.curves.expressiveEffects
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user