From d60a9b6f2b24d2566276e8d8ef1800b5d2281173 Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Mon, 23 Feb 2026 14:35:42 +0100 Subject: [PATCH] Make the chat sending text area take all the space available in splitview #LINQT-2382 --- .../Control/Input/Chat/ChatDroppableTextArea.qml | 15 ++++++++++----- Linphone/view/Page/Form/Chat/SelectedChatView.qml | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Linphone/view/Control/Input/Chat/ChatDroppableTextArea.qml b/Linphone/view/Control/Input/Chat/ChatDroppableTextArea.qml index 5d10ac5ab..d0c65f29d 100644 --- a/Linphone/view/Control/Input/Chat/ChatDroppableTextArea.qml +++ b/Linphone/view/Control/Input/Chat/ChatDroppableTextArea.qml @@ -64,6 +64,7 @@ Control.Control { rightPadding: Utils.getSizeWithScreenRatio(15) topPadding: Utils.getSizeWithScreenRatio(16) bottomPadding: Utils.getSizeWithScreenRatio(16) + background: Rectangle { anchors.fill: parent color: DefaultStyle.grey_100 @@ -97,9 +98,7 @@ Control.Control { } Control.Control { id: sendingControl - onHeightChanged: { - sendingAreaStackView.height = height - } + Layout.preferredHeight: mainItem.height - mainItem.topPadding - mainItem.rightPadding Layout.fillWidth: true Layout.alignment: Qt.AlignCenter leftPadding: Utils.getSizeWithScreenRatio(24) @@ -120,7 +119,6 @@ Control.Control { contentItem: RowLayout { Flickable { id: sendingAreaFlickable - Layout.preferredHeight: Math.min(Utils.getSizeWithScreenRatio(100), contentHeight) Layout.fillHeight: true width: sendingControl.width - sendingControl.leftPadding - sendingControl.rightPadding Layout.fillWidth: true @@ -128,6 +126,13 @@ Control.Control { contentHeight: sendingTextArea.contentHeight contentWidth: width + onContentHeightChanged: { + if (sendingTextArea.contentHeight > mainItem.height - (mainItem.topPadding + mainItem.bottomPadding + sendingControl.topPadding + sendingControl.bottomPadding) + && sendingTextArea.contentHeight < Utils.getSizeWithScreenRatio(100)) { + mainItem.height = sendingTextArea.contentHeight + mainItem.topPadding + mainItem.bottomPadding + sendingControl.topPadding + sendingControl.bottomPadding + } + } + function ensureVisible(r) { if (contentX >= r.x) contentX = r.x; @@ -141,13 +146,13 @@ Control.Control { TextArea { id: sendingTextArea - // RectangleTest{anchors.fill: parent} width: sendingAreaFlickable.width height: implicitHeight// sendingAreaFlickable.height textFormat: TextEdit.PlainText onTextChanged: { mainItem.text = text } + Component.onCompleted: { mainItem.textArea = sendingTextArea sendingTextArea.text = mainItem.text diff --git a/Linphone/view/Page/Form/Chat/SelectedChatView.qml b/Linphone/view/Page/Form/Chat/SelectedChatView.qml index a4ac25f55..d93766e8e 100644 --- a/Linphone/view/Page/Form/Chat/SelectedChatView.qml +++ b/Linphone/view/Page/Form/Chat/SelectedChatView.qml @@ -505,6 +505,7 @@ FocusScope { ChatDroppableTextArea { id: messageSender Control.SplitView.preferredHeight: mainItem.chat?.core.isReadOnly ? 0 : height + Control.SplitView.fillHeight: true Control.SplitView.minimumHeight: mainItem.chat?.core.isReadOnly ? 0 : Utils.getSizeWithScreenRatio(79) chat: mainItem.chat selectedFilesCount: contents.count