mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: show keyboard when entering credential screen
If the user goes to the credentials screen, they likely want to edit something. So put the focus on the first entry field and show the keyboard. We also need to hide the keyboard when the credential screen becomes invisble so that the keyboard doesn't stay around when the dive list is shown. Suggested-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e216f91ebc
commit
7434e4213b
1 changed files with 10 additions and 0 deletions
|
@ -23,6 +23,16 @@ Item {
|
|||
ColumnLayout {
|
||||
id: outerLayout
|
||||
width: subsurfaceTheme.columnWidth - 2 * MobileComponents.Units.gridUnit
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
Qt.inputMethod.show()
|
||||
login.forceActiveFocus()
|
||||
} else {
|
||||
Qt.inputMethod.hide()
|
||||
}
|
||||
}
|
||||
|
||||
MobileComponents.Heading {
|
||||
text: "Cloud credentials"
|
||||
level: headingLevel
|
||||
|
|
Loading…
Add table
Reference in a new issue