summaryrefslogtreecommitdiff
path: root/modules/lock/Input.qml
diff options
context:
space:
mode:
Diffstat (limited to 'modules/lock/Input.qml')
-rw-r--r--modules/lock/Input.qml60
1 files changed, 20 insertions, 40 deletions
diff --git a/modules/lock/Input.qml b/modules/lock/Input.qml
index b989bb9..1e164b8 100644
--- a/modules/lock/Input.qml
+++ b/modules/lock/Input.qml
@@ -12,60 +12,40 @@ import QtQuick.Layouts
ColumnLayout {
id: root
- required property WlSessionLockSurface lock
+ required property var lock
property string passwordBuffer
+ Layout.preferredWidth: Config.lock.sizes.faceSize * 2
+ Layout.fillWidth: false
spacing: Appearance.spacing.large * 2
- RowLayout {
- Layout.alignment: Qt.AlignHCenter
- Layout.topMargin: Appearance.padding.large * 3
- Layout.maximumWidth: Config.lock.sizes.inputWidth - Appearance.rounding.large * 2
-
- spacing: Appearance.spacing.large
-
- StyledClippingRect {
- Layout.alignment: Qt.AlignVCenter
- implicitWidth: Config.lock.sizes.faceSize
- implicitHeight: Config.lock.sizes.faceSize
-
- radius: Appearance.rounding.large
- color: Colours.tPalette.m3surfaceContainer
+ StyledRect {
+ Layout.fillWidth: true
+ implicitHeight: user.implicitHeight + Appearance.padding.small * 2
- MaterialIcon {
- anchors.centerIn: parent
+ color: Colours.tPalette.m3surfaceContainer
+ radius: Appearance.rounding.small
- text: "person"
- fill: 1
- grade: 200
- font.pointSize: Config.lock.sizes.faceSize / 2
- }
+ RowLayout {
+ id: user
- CachingImage {
- anchors.fill: parent
- path: `${Paths.stringify(Paths.home)}/.face`
- }
- }
+ anchors.centerIn: parent
- ColumnLayout {
- Layout.fillWidth: true
- Layout.alignment: Qt.AlignVCenter
- spacing: Appearance.spacing.small
+ spacing: Appearance.spacing.normal
- StyledText {
- Layout.fillWidth: true
- text: qsTr("Welcome back, %1").arg(Quickshell.env("USER"))
- font.pointSize: Appearance.font.size.extraLarge
+ MaterialIcon {
+ text: "account_circle"
+ font.pointSize: Appearance.font.size.large * 1.4
font.weight: 500
- elide: Text.ElideRight
}
StyledText {
- Layout.fillWidth: true
- text: qsTr("Logging in to %1").arg(Quickshell.env("XDG_CURRENT_DESKTOP") || Quickshell.env("XDG_SESSION_DESKTOP"))
- color: Colours.palette.m3tertiary
+ // Layout.fillWidth: true
+ text: Quickshell.env("USER")
font.pointSize: Appearance.font.size.large
+ // font.capitalization: Font.Capitalize
+ font.weight: 500
elide: Text.ElideRight
}
}
@@ -121,7 +101,7 @@ ColumnLayout {
onCompleted: res => {
if (res === PamResult.Success)
- return root.lock.unlock();
+ return root.lock.lock.unlock();
if (res === PamResult.Error)
placeholder.pamState = "error";