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/Content.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/Content.qml')
| -rw-r--r-- | modules/lock/Content.qml | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/modules/lock/Content.qml b/modules/lock/Content.qml new file mode 100644 index 0000000..15e1425 --- /dev/null +++ b/modules/lock/Content.qml @@ -0,0 +1,105 @@ +pragma ComponentBehavior: Bound + +import qs.components +import qs.components.images +import qs.services +import qs.config +import qs.utils +import QtQuick +import QtQuick.Layouts + +GridLayout { + id: root + + required property var lock + + anchors.fill: parent + anchors.margins: Appearance.padding.large + + rowSpacing: Appearance.spacing.large + columnSpacing: Appearance.spacing.large + + rows: 2 + columns: 3 + + StyledRect { + Layout.row: 0 + Layout.column: 0 + Layout.fillWidth: true + Layout.fillHeight: true + + radius: Appearance.rounding.small + color: Colours.tPalette.m3surfaceContainer + } + + StyledRect { + Layout.row: 1 + Layout.column: 0 + Layout.fillWidth: true + Layout.fillHeight: true + + radius: Appearance.rounding.small + color: Colours.tPalette.m3surfaceContainer + } + + StyledClippingRect { + Layout.row: 0 + Layout.column: 1 + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + + implicitWidth: Config.lock.sizes.faceSize + implicitHeight: Config.lock.sizes.faceSize + + radius: Appearance.rounding.large + color: Colours.tPalette.m3surfaceContainer + + MaterialIcon { + anchors.centerIn: parent + + text: "person" + fill: 1 + grade: 200 + font.pointSize: Math.floor(Config.lock.sizes.faceSize / 2) + } + + CachingImage { + id: pfp + + anchors.fill: parent + path: `${Paths.stringify(Paths.home)}/.face` + } + } + + Input { + Layout.row: 1 + Layout.column: 1 + + lock: root.lock + } + + StyledRect { + Layout.row: 0 + Layout.column: 2 + Layout.fillWidth: true + Layout.fillHeight: true + + radius: Appearance.rounding.small + color: Colours.tPalette.m3surfaceContainer + } + + StyledRect { + Layout.row: 1 + Layout.column: 2 + Layout.fillWidth: true + Layout.fillHeight: true + + radius: Appearance.rounding.small + color: Colours.tPalette.m3surfaceContainer + } + + component Anim: NumberAnimation { + duration: Appearance.anim.durations.normal + easing.type: Easing.BezierSpline + easing.bezierCurve: Appearance.anim.curves.standard + } +} |