diff options
author | Joakim Bygdell <j.bygdell@gmail.com> | 2017-07-31 15:55:30 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-08-02 18:49:47 -0700 |
commit | 97f1dc0b0186fc28056f091fa346f60228f7ce2c (patch) | |
tree | 7c3ec9973e8e9c96f2eb1345717fc21285cc1862 /mobile-widgets | |
parent | 9e9e06aed6429fafb603dffca6207f09d1d8c3b6 (diff) | |
download | subsurface-97f1dc0b0186fc28056f091fa346f60228f7ce2c.tar.gz |
QML UI: autocomplete objects should lose focus on selection
When the user makes a selection using the autocomplete function while editing a dive the keyboard should close and the selection list should disappear.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qml/DiveDetailsEdit.qml | 1 | ||||
-rw-r--r-- | mobile-widgets/qml/HintsTextEdit.qml | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveDetailsEdit.qml b/mobile-widgets/qml/DiveDetailsEdit.qml index 796c9a5b4..4192b0e74 100644 --- a/mobile-widgets/qml/DiveDetailsEdit.qml +++ b/mobile-widgets/qml/DiveDetailsEdit.qml @@ -156,6 +156,7 @@ Item { Kirigami.Label { Layout.alignment: Qt.AlignRight text: qsTr("Air Temp:") + font.pointSize: subsurfaceTheme.smallPointSize } TextField { id: txtAirTemp diff --git a/mobile-widgets/qml/HintsTextEdit.qml b/mobile-widgets/qml/HintsTextEdit.qml index 5bf57207f..4ed3b51ab 100644 --- a/mobile-widgets/qml/HintsTextEdit.qml +++ b/mobile-widgets/qml/HintsTextEdit.qml @@ -15,6 +15,7 @@ TextField { textUpdateTimer.restart(); } onFocusChanged: frame.shouldShow = focus + onVisibleChanged: { if (visible) { focus = false @@ -27,6 +28,9 @@ TextField { Keys.onDownPressed: { hintsView.currentIndex++; } + Keys.onReturnPressed: { + focus = false + } Timer { id: textUpdateTimer interval: 300 @@ -107,7 +111,7 @@ TextField { onClicked: { hintsView.currentIndex = index root.text = modelData - frame.shouldShow = false; + root.focus = false; } } ScrollBar.vertical: ScrollBar { } |