Skip to content
Snippets Groups Projects
Unverified Commit ab05e2d8 authored by Malte E's avatar Malte E Committed by GitHub
Browse files

Mobile message input (#962)

* swap send and sticker icons based on text input

* collapse MessageInput options when window is narrow

* buttons disappear once you type/send partial text from input method
parent 12a6da01
No related branches found
No related tags found
No related merge requests found
Pipeline #2757 passed
......@@ -18,6 +18,8 @@ Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: row.implicitHeight
Layout.minimumHeight: 40
property bool showAllButtons: width > 450 || (messageInput.length == 0 && !messageInput.inputMethodComposing)
Component {
id: placeCallDialog
......@@ -35,7 +37,7 @@ Rectangle {
spacing: 0
ImageButton {
visible: CallManager.callsSupported
visible: CallManager.callsSupported && showAllButtons
opacity: CallManager.haveCallInvite ? 0.3 : 1
Layout.alignment: Qt.AlignBottom
hoverEnabled: true
......@@ -61,6 +63,7 @@ Rectangle {
}
ImageButton {
visible: showAllButtons
Layout.alignment: Qt.AlignBottom
hoverEnabled: true
width: 22
......@@ -134,6 +137,7 @@ Rectangle {
padding: 0
topPadding: 8
bottomPadding: 8
leftPadding: inputBar.showAllButtons? 0 : 8
focus: true
onTextChanged: {
if (room)
......@@ -387,6 +391,7 @@ Rectangle {
ImageButton {
id: stickerButton
visible: showAllButtons
Layout.alignment: Qt.AlignRight | Qt.AlignBottom
Layout.margins: 8
......@@ -437,6 +442,7 @@ Rectangle {
ToolTip.visible: hovered
ToolTip.text: qsTr("Send")
onClicked: {
messageInput.append(messageInput.preeditText)
room.input.send();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment