lock screen: keep password prompt centered when error text appears
This commit is contained in:
parent
a0cb1d991d
commit
94a3fdb86c
1 changed files with 22 additions and 32 deletions
|
|
@ -124,12 +124,12 @@ WlSessionLockSurface {
|
||||||
unlockFade: root._unlockFade
|
unlockFade: root._unlockFade
|
||||||
}
|
}
|
||||||
|
|
||||||
// Center content - password and notifications
|
// Center content - password dead center, error below
|
||||||
Item {
|
Item {
|
||||||
id: content
|
id: content
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: 320
|
width: 320
|
||||||
height: _col.height
|
height: _lockInput.height
|
||||||
|
|
||||||
NumberAnimation on opacity {
|
NumberAnimation on opacity {
|
||||||
from: 0
|
from: 0
|
||||||
|
|
@ -144,41 +144,31 @@ WlSessionLockSurface {
|
||||||
easing.type: Easing.OutCubic
|
easing.type: Easing.OutCubic
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
// Password input - anchored at center
|
||||||
id: _col
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
spacing: 24
|
|
||||||
|
|
||||||
// Password input
|
|
||||||
LockInput {
|
LockInput {
|
||||||
|
id: _lockInput
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: 280
|
width: 280
|
||||||
buffer: root.auth.buffer
|
buffer: root.auth.buffer
|
||||||
state: root.auth.state
|
state: root.auth.state
|
||||||
}
|
}
|
||||||
|
|
||||||
// Error message
|
// Error message - fixed position below password, never shifts layout
|
||||||
Text {
|
Text {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.top: _lockInput.bottom
|
||||||
|
anchors.topMargin: 16
|
||||||
text: root.auth.message
|
text: root.auth.message
|
||||||
color: S.Theme.base08
|
color: S.Theme.base08
|
||||||
font.pixelSize: S.Theme.fontSize - 1
|
font.pixelSize: S.Theme.fontSize - 1
|
||||||
font.family: S.Theme.fontFamily
|
font.family: S.Theme.fontFamily
|
||||||
opacity: root.auth.message ? 1 : 0
|
opacity: root.auth.message ? 1 : 0
|
||||||
height: root.auth.message ? implicitHeight : 0
|
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: 200
|
duration: 200
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Behavior on height {
|
|
||||||
NumberAnimation {
|
|
||||||
duration: 200
|
|
||||||
easing.type: Easing.OutCubic
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue