diff --git a/examples/cl-repl/lisp/dialogs.lisp b/examples/cl-repl/lisp/dialogs.lisp index dbdd3b8..6852d0f 100644 --- a/examples/cl-repl/lisp/dialogs.lisp +++ b/examples/cl-repl/lisp/dialogs.lisp @@ -38,12 +38,12 @@ (qrun* (unless (x:empty-string query) (q> |text| ui:*query-text* (string-trim '(#\Newline) query))) - (q> |text| ui:*query-input* " ") ; hack 1 (see 'QueryDialog.qml') + (q! |clear| ui:*query-input*) (wait-while-transition) (push-dialog :query) (q! |forceActiveFocus| ui:*query-input*) (q! |showKeyboard| ui:*main* t) ; needed on recursive calls - (qsingle-shot 250 (lambda () (q! |clear| ui:*query-input*))) ; hack 2 (see 'QueryDialog.qml') + (qsingle-shot 500 (lambda () (q! |positionViewAtEnd| ui:*output*))) (wait-for-closed) (qlater (lambda () (editor:ensure-focus :show))) (q< |text| ui:*query-input*))) diff --git a/examples/cl-repl/platforms/android/AndroidManifest.xml b/examples/cl-repl/platforms/android/AndroidManifest.xml index d95e1bb..acc40e3 100644 --- a/examples/cl-repl/platforms/android/AndroidManifest.xml +++ b/examples/cl-repl/platforms/android/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/examples/cl-repl/qml/ext/QueryDialog.qml b/examples/cl-repl/qml/ext/QueryDialog.qml index e0400da..38e8b1a 100644 --- a/examples/cl-repl/qml/ext/QueryDialog.qml +++ b/examples/cl-repl/qml/ext/QueryDialog.qml @@ -35,8 +35,6 @@ Popup { Lisp.call("dialogs:exited") Lisp.call("editor:ensure-output-visible") } - - onTextChanged: if (length === 0) main.ensureOutputVisible() // hack (see 'dialogs.lisp') } Text { diff --git a/examples/cl-repl/qml/main.qml b/examples/cl-repl/qml/main.qml index 9e328ed..1535020 100644 --- a/examples/cl-repl/qml/main.qml +++ b/examples/cl-repl/qml/main.qml @@ -23,11 +23,10 @@ StackView { return (h === 0) ? main.height : h } - function divideHeight(factor) { return (availableHeight() - rectCommand.height) * factor } - function isLandscape() { return (Screen.primaryOrientation === Qt.LandscapeOrientation) } - function keyboardVisible() { return Qt.inputMethod.visible } - function showKeyboard(show) { show ? Qt.inputMethod.show() : Qt.inputMethod.hide() } - function ensureOutputVisible() { output.positionViewAtEnd() } + function divideHeight(factor) { return (availableHeight() - rectCommand.height) * factor } + function isLandscape() { return (Screen.primaryOrientation === Qt.LandscapeOrientation) } + function keyboardVisible() { return Qt.inputMethod.visible } + function showKeyboard(show) { show ? Qt.inputMethod.show() : Qt.inputMethod.hide() } // show/hide dialogs