config moved to c++ plugin, removed old qml + fileview implementation

This commit is contained in:
2026-08-13 02:25:26 +02:00
parent c29b91cd26
commit 3cd3209b28
341 changed files with 4851 additions and 3502 deletions
+36 -35
View File
@@ -5,8 +5,9 @@ import QtQuick.Layouts
import qs.Paths
import qs.Components
import qs.Helpers
import qs.Config
import ZShell.Config
import qs.Modules
import qs.Services
ColumnLayout {
id: root
@@ -18,61 +19,61 @@ ColumnLayout {
Layout.fillHeight: true
Layout.fillWidth: false
Layout.preferredWidth: centerWidth
spacing: Appearance.spacing.large * 2
spacing: Tokens.spacing.large * 2
RowLayout {
Layout.alignment: Qt.AlignHCenter
spacing: Appearance.spacing.small
spacing: Tokens.spacing.small
CustomText {
Layout.alignment: Qt.AlignVCenter
color: DynamicColors.palette.m3secondary
color: Colors.palette.m3secondary
font.bold: true
font.family: Appearance.font.family.clock
font.pointSize: Math.floor(Appearance.font.size.extraLarge * 3 * root.centerScale)
font.pointSize: Math.floor(Tokens.font.size.extraLarge * 3 * root.centerScale)
text: Time.hourStr
}
CustomText {
Layout.alignment: Qt.AlignVCenter
color: DynamicColors.palette.m3primary
color: Colors.palette.m3primary
font.bold: true
font.family: Appearance.font.family.clock
font.pointSize: Math.floor(Appearance.font.size.extraLarge * 3 * root.centerScale)
font.pointSize: Math.floor(Tokens.font.size.extraLarge * 3 * root.centerScale)
text: ":"
}
CustomText {
Layout.alignment: Qt.AlignVCenter
color: DynamicColors.palette.m3secondary
color: Colors.palette.m3secondary
font.bold: true
font.family: Appearance.font.family.clock
font.pointSize: Math.floor(Appearance.font.size.extraLarge * 3 * root.centerScale)
font.pointSize: Math.floor(Tokens.font.size.extraLarge * 3 * root.centerScale)
text: Time.minuteStr
}
}
CustomText {
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: -Appearance.padding.large * 2
color: DynamicColors.palette.m3tertiary
Layout.topMargin: -Tokens.padding.large * 2
color: Colors.palette.m3tertiary
font.bold: true
font.family: Appearance.font.family.mono
font.pointSize: Math.floor(Appearance.font.size.extraLarge * root.centerScale)
font.pointSize: Math.floor(Tokens.font.size.extraLarge * root.centerScale)
text: Time.format("dddd, d MMMM yyyy")
}
CustomClippingRect {
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: Appearance.spacing.large * 2
color: DynamicColors.tPalette.m3surfaceContainer
Layout.topMargin: Tokens.spacing.large * 2
color: Colors.tPalette.m3surfaceContainer
implicitHeight: root.centerWidth / 2
implicitWidth: root.centerWidth / 2
radius: Appearance.rounding.full
radius: Tokens.rounding.full
MaterialIcon {
anchors.centerIn: parent
color: DynamicColors.palette.m3onSurfaceVariant
color: Colors.palette.m3onSurfaceVariant
font.pointSize: Math.floor(root.centerWidth / 4)
text: "person"
}
@@ -87,11 +88,11 @@ ColumnLayout {
CustomRect {
Layout.alignment: Qt.AlignHCenter
color: DynamicColors.tPalette.m3surfaceContainer
color: Colors.tPalette.m3surfaceContainer
focus: true
implicitHeight: input.implicitHeight + Appearance.padding.small * 2
implicitHeight: input.implicitHeight + Tokens.padding.small * 2
implicitWidth: root.centerWidth * 0.8
radius: Appearance.rounding.full
radius: Tokens.rounding.full
Keys.onPressed: event => {
if (root.lock.unlocking)
@@ -120,11 +121,11 @@ ColumnLayout {
id: input
anchors.fill: parent
anchors.margins: Appearance.padding.small
spacing: Appearance.spacing.normal
anchors.margins: Tokens.padding.small
spacing: Tokens.spacing.normal
Item {
implicitHeight: fprintIcon.implicitHeight + Appearance.padding.small * 2
implicitHeight: fprintIcon.implicitHeight + Tokens.padding.small * 2
implicitWidth: implicitHeight
MaterialIcon {
@@ -132,7 +133,7 @@ ColumnLayout {
anchors.centerIn: parent
animate: true
color: root.lock.pam.fprint.tries >= Config.lock.maxFprintTries ? DynamicColors.palette.m3error : DynamicColors.palette.m3onSurface
color: root.lock.pam.fprint.tries >= Config.lock.maxFprintTries ? Colors.palette.m3error : Colors.palette.m3onSurface
opacity: root.lock.pam.passwd.active ? 0 : 1
text: {
if (root.lock.pam.fprint.tries >= Config.lock.maxFprintTries)
@@ -161,13 +162,13 @@ ColumnLayout {
}
CustomRect {
color: root.lock.pam.buffer ? DynamicColors.palette.m3primary : DynamicColors.layer(DynamicColors.palette.m3surfaceContainerHigh, 2)
implicitHeight: enterIcon.implicitHeight + Appearance.padding.small * 2
color: root.lock.pam.buffer ? Colors.palette.m3primary : Colors.layer(Colors.palette.m3surfaceContainerHigh, 2)
implicitHeight: enterIcon.implicitHeight + Tokens.padding.small * 2
implicitWidth: implicitHeight
radius: Appearance.rounding.full
radius: Tokens.rounding.full
StateLayer {
color: root.lock.pam.buffer ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
color: root.lock.pam.buffer ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
onClicked: {
root.lock.pam.passwd.start();
@@ -178,7 +179,7 @@ ColumnLayout {
id: enterIcon
anchors.centerIn: parent
color: root.lock.pam.buffer ? DynamicColors.palette.m3onPrimary : DynamicColors.palette.m3onSurface
color: root.lock.pam.buffer ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface
font.weight: 500
text: "arrow_forward"
}
@@ -188,7 +189,7 @@ ColumnLayout {
Item {
Layout.fillWidth: true
Layout.topMargin: -Appearance.spacing.large
Layout.topMargin: -Tokens.spacing.large
implicitHeight: Math.max(message.implicitHeight, stateMessage.implicitHeight)
Behavior on implicitHeight {
@@ -224,7 +225,7 @@ ColumnLayout {
anchors.left: parent.left
anchors.right: parent.right
animateProp: "opacity"
color: DynamicColors.palette.m3onSurfaceVariant
color: Colors.palette.m3onSurfaceVariant
font.family: Appearance.font.family.mono
horizontalAlignment: Qt.AlignHCenter
lineHeight: 1.2
@@ -293,9 +294,9 @@ ColumnLayout {
anchors.left: parent.left
anchors.right: parent.right
color: DynamicColors.palette.m3error
color: Colors.palette.m3error
font.family: Appearance.font.family.mono
font.pointSize: Appearance.font.size.small
font.pointSize: Tokens.font.size.small
horizontalAlignment: Qt.AlignHCenter
opacity: 0
scale: 0.7
@@ -365,14 +366,14 @@ ColumnLayout {
id: exitAnim
Anim {
duration: Appearance.anim.durations.large
duration: Tokens.anim.durations.large
property: "scale"
target: message
to: 0.7
}
Anim {
duration: Appearance.anim.durations.large
duration: Tokens.anim.durations.large
property: "opacity"
target: message
to: 0
@@ -382,7 +383,7 @@ ColumnLayout {
}
component FlashAnim: NumberAnimation {
duration: Appearance.anim.durations.small
duration: Tokens.anim.durations.small
easing.type: Easing.Linear
property: "opacity"
target: message