nosignal-shell/modules/lock/Center.qml
2 * r + 2 * t a1124c8228
feat: expressive lock input (#1536)
* feat: shapes in lock input

* fix: better lock input placeholder

* feat: scale lock center properly + style improvements

* fix: use non anim placeholder width

* fix: not mono lock state text

* fix: use shape queue instead of random

* fix: use scale for enter button instead of state layer

* fix: no slant for lock state message

* fix: enter button pressable when no buffer
2026-06-09 19:07:18 +10:00

53 lines
1.4 KiB
QML

import "center"
import QtQuick
import QtQuick.Layouts
import Caelestia.Config
import qs.components
import qs.services
ColumnLayout {
id: root
required property var lock
readonly property real centerScale: Math.min(1, (lock.screen?.height ?? 1440) / 1440)
readonly property int centerWidth: Tokens.sizes.lock.centerWidth * centerScale
Layout.preferredWidth: centerWidth
Layout.fillWidth: false
Layout.fillHeight: true
spacing: Tokens.spacing.largeIncreased
Clock {
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: Tokens.padding.large
centerScale: root.centerScale
}
StyledText {
Layout.alignment: Qt.AlignHCenter
text: Time.format("dddd • d MMM").toUpperCase()
color: Colours.palette.m3onSurface
font: Tokens.font.title.builders.medium.weight(Font.DemiBold).build()
}
ProfilePic {
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: Tokens.spacing.extraExtraLarge * root.centerScale
Layout.bottomMargin: Tokens.spacing.extraLarge * root.centerScale
centerWidth: root.centerWidth
}
PasswordInput {
Layout.alignment: Qt.AlignHCenter
centerScale: Math.max(0.8, root.centerScale)
centerWidth: root.centerWidth
lock: root.lock
}
StateMessage {
Layout.fillWidth: true
pam: root.lock.pam
}
}