diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-10 17:17:51 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-10 17:17:51 +1000 |
| commit | ba1c6fda43c44237a4fe5db092d6441eb85ef2dc (patch) | |
| tree | 6172ab70ba69584e2e7c785f8336ddeb60f8e761 /modules/lock/Input.qml | |
| parent | Merge branch 'main' into new-lock (diff) | |
| download | caelestia-shell-ba1c6fda43c44237a4fe5db092d6441eb85ef2dc.tar.gz caelestia-shell-ba1c6fda43c44237a4fe5db092d6441eb85ef2dc.tar.bz2 caelestia-shell-ba1c6fda43c44237a4fe5db092d6441eb85ef2dc.zip | |
lock: add content + better unlock anim
Diffstat (limited to 'modules/lock/Input.qml')
| -rw-r--r-- | modules/lock/Input.qml | 60 |
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"; |