1
0
Fork 0

Tweaks to location search based on feedback

This commit is contained in:
James Turner 2018-06-17 21:15:10 +01:00
parent 8f205040dc
commit 198f9ccb70
2 changed files with 19 additions and 4 deletions

View file

@ -140,7 +140,7 @@ Item {
anchors.margins: Style.margin
autoSubmit: false
placeholder: qsTr("Enter a navaid or airport ID, name or a latitude & longitude");
placeholder: qsTr("Search for an airport or navaid");
onSearch: {
// when th search term is cleared, show the history
@ -163,13 +163,26 @@ Item {
}
}
Text {
id: searchHelpText
anchors.right: parent.right
anchors.top: searchButton.bottom
anchors.left: parent.left
anchors.margins: Style.margin
wrapMode: Text.WordWrap
text: qsTr("Enter the name, partial name or ident of a navaid or fix, or an " +
"airport name or ICAO identifier. Alternatively, enter a latitude & longitude in " +
"decimal notation, i.e. '-3.5, 55.4'")
}
Rectangle {
id: headerSplit
color: Style.frameColor
height: 1
width: parent.width - Style.inset
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: searchButton.bottom
anchors.top: searchHelpText.bottom
anchors.topMargin: Style.margin
}

View file

@ -94,8 +94,10 @@ FocusScope
hoverEnabled: true
onClicked: {
root.forceActiveFocus();
buttonText.text = "";
if (!buttonText.activeFocus) {
root.forceActiveFocus();
buttonText.selectAll();
}
}
}