diff --git a/kde/gui/ChatPane.qml b/kde/gui/ChatPane.qml index aea7e77..b2397ce 100644 --- a/kde/gui/ChatPane.qml +++ b/kde/gui/ChatPane.qml @@ -203,10 +203,18 @@ Item { // Input RowLayout { + id: inputRow Layout.fillWidth: true Layout.margins: 6 spacing: 4 + function doSubmit() { + if (promptInput.text.trim() !== "") { + ollie.submit(promptInput.text.trim()) + promptInput.text = "" + } + } + // TextArea in ScrollView for overflow, with context menu overlay Item { Layout.fillWidth: true @@ -246,10 +254,7 @@ Item { if (event.modifiers & Qt.ShiftModifier) { event.accepted = false } else { - if (text.trim() !== "") { - ollie.submit(text.trim()) - text = "" - } + inputRow.doSubmit() event.accepted = true } } @@ -285,6 +290,19 @@ Item { } } } + + Button { + text: "▶" + Layout.alignment: Qt.AlignBottom + Layout.preferredWidth: 36 + Layout.preferredHeight: 36 + focusPolicy: Qt.NoFocus + enabled: promptInput.enabled && promptInput.text.trim() !== "" + onClicked: inputRow.doSubmit() + + ToolTip.visible: hovered + ToolTip.text: "Send (Enter)" + } } }