Fix lock input not working after switching tty or suspending
This commit is contained in:
30
Lock.qml
30
Lock.qml
@@ -14,6 +14,7 @@ WlSessionLock {
|
||||
function instalock() {lock.animate = false; lock.locked = true}
|
||||
function open() {lock.animate = true; lock.locked = true}
|
||||
function close() {lock.locked = false}
|
||||
property var clock: SystemClock {}
|
||||
WlSessionLockSurface {
|
||||
id: surface
|
||||
color: "transparent"
|
||||
@@ -35,19 +36,34 @@ WlSessionLock {
|
||||
color: "#222222"
|
||||
TextInput {
|
||||
id: input
|
||||
x: (parent.width - this.width)/2
|
||||
Behavior on x { NumberAnimation {
|
||||
duration: 300
|
||||
easing.type: Easing.OutQuint
|
||||
}}
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.fill: parent
|
||||
focus: true
|
||||
color: "white"
|
||||
font.pixelSize: 20
|
||||
echoMode: TextInput.Password
|
||||
echoMode: TextInput.NoEcho
|
||||
cursorDelegate: Item {}
|
||||
Keys.onReturnPressed: pam.start()
|
||||
}
|
||||
Row {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
x: (parent.width - this.width)/2
|
||||
spacing: 4
|
||||
Repeater {
|
||||
model: input.text.length
|
||||
Rectangle {
|
||||
width: 8
|
||||
height: width
|
||||
radius: width/2
|
||||
color: "white"
|
||||
}
|
||||
}
|
||||
Behavior on x {
|
||||
NumberAnimation {
|
||||
duration: 300
|
||||
easing.type: Easing.OutQuint
|
||||
}
|
||||
}
|
||||
}
|
||||
Text {
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
|
||||
Reference in New Issue
Block a user