aboutsummaryrefslogtreecommitdiff
path: root/qml/ComposePane.qml
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-03-20 13:40:32 +0300
committerlink2xt <link2xt@testrun.org>2021-03-20 13:40:32 +0300
commit5d4cb0a4eb7efd97dd0ee48f75feda9f9d30eabb (patch)
tree940612d7f431c580fd76c115ff0f2f03af051f58 /qml/ComposePane.qml
parent03337e065fa4b74e88086f2b45f63753c9127231 (diff)
downloadkdeltachat-5d4cb0a4eb7efd97dd0ee48f75feda9f9d30eabb.tar.gz
kdeltachat-5d4cb0a4eb7efd97dd0ee48f75feda9f9d30eabb.zip
Move ComposePane to separate QML file
Diffstat (limited to 'qml/ComposePane.qml')
-rw-r--r--qml/ComposePane.qml38
1 files changed, 38 insertions, 0 deletions
diff --git a/qml/ComposePane.qml b/qml/ComposePane.qml
new file mode 100644
index 0000000..bbf075b
--- /dev/null
+++ b/qml/ComposePane.qml
@@ -0,0 +1,38 @@
+import QtQuick 2.12
+import QtQuick.Controls 2.12
+import QtQuick.Layouts 1.12
+
+import DeltaChat 1.0
+
+Pane {
+ Layout.fillWidth: true
+ padding: 0
+
+ required property DcContext context
+ required property var chatId
+
+ RowLayout {
+ width: parent.width
+
+ TextArea {
+ id: messageField
+
+ Layout.fillWidth: true
+ placeholderText: qsTr("Message")
+ wrapMode: TextArea.Wrap
+ selectByMouse: true
+ }
+
+ Button {
+ id: sendButton
+
+ icon.name: "document-send"
+ text: qsTr("Send")
+ enabled: messageField.length > 0
+ onClicked: {
+ chatPage.context.sendTextMessage(chatId, messageField.text)
+ messageField.text = ""
+ }
+ }
+ }
+}