From ba1c6fda43c44237a4fe5db092d6441eb85ef2dc Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 10 Aug 2025 17:17:51 +1000 Subject: lock: add content + better unlock anim --- modules/lock/Content.qml | 105 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 modules/lock/Content.qml (limited to 'modules/lock/Content.qml') 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 + } +} -- cgit v1.2.3-freya