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 instalock() {lock.animate = false; lock.locked = true}
|
||||||
function open() {lock.animate = true; lock.locked = true}
|
function open() {lock.animate = true; lock.locked = true}
|
||||||
function close() {lock.locked = false}
|
function close() {lock.locked = false}
|
||||||
|
property var clock: SystemClock {}
|
||||||
WlSessionLockSurface {
|
WlSessionLockSurface {
|
||||||
id: surface
|
id: surface
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
@@ -35,19 +36,34 @@ WlSessionLock {
|
|||||||
color: "#222222"
|
color: "#222222"
|
||||||
TextInput {
|
TextInput {
|
||||||
id: input
|
id: input
|
||||||
x: (parent.width - this.width)/2
|
anchors.fill: parent
|
||||||
Behavior on x { NumberAnimation {
|
|
||||||
duration: 300
|
|
||||||
easing.type: Easing.OutQuint
|
|
||||||
}}
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
focus: true
|
focus: true
|
||||||
color: "white"
|
color: "white"
|
||||||
font.pixelSize: 20
|
font.pixelSize: 20
|
||||||
echoMode: TextInput.Password
|
echoMode: TextInput.NoEcho
|
||||||
cursorDelegate: Item {}
|
cursorDelegate: Item {}
|
||||||
Keys.onReturnPressed: pam.start()
|
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 {
|
Text {
|
||||||
anchors {
|
anchors {
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
|||||||
Reference in New Issue
Block a user