Verified Commit 07bcca38 authored by Simon Schmeißer's avatar Simon Schmeißer Committed by Jonah Brüchert

close menu when opening text search, focus input field, enter closes InputSheet

parent 4f6dd70d
......@@ -34,6 +34,12 @@ Kirigami.OverlaySheet {
signal accepted
function accept() {
inputSheet.text = sheetTextField.text
inputSheet.close()
accepted()
}
ColumnLayout {
Kirigami.Heading {
text: title
......@@ -49,16 +55,19 @@ Kirigami.OverlaySheet {
id: sheetTextField
Layout.fillWidth: true
placeholderText: inputSheet.placeholderText
focus: true
onEditingFinished: accept()
}
Controls.Button {
text: "Ok"
Layout.alignment: Qt.AlignRight
onClicked: {
inputSheet.text = sheetTextField.text
inputSheet.close()
accepted()
}
onClicked: accept()
}
}
onSheetOpenChanged: {
if (sheetOpen)
sheetTextField.forceActiveFocus()
}
}
......@@ -150,7 +150,10 @@ ColumnLayout {
iconSource: "edit-find"
Layout.fillWidth: true
Layout.preferredHeight: buttonSize
onClicked: findSheet.open()
onClicked: {
options.state = "hidden"
findSheet.open()
}
text: i18n("Find in page")
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment