From f91b047e8e5ee46906ac972c4245c7634e005872 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 --- Linphone/data/languages/de.ts | 34 +++++++++---------- Linphone/data/languages/en.ts | 34 +++++++++---------- Linphone/data/languages/fr.ts | 34 +++++++++---------- .../Input/Chat/ChatDroppableTextArea.qml | 15 +++++--- .../view/Page/Form/Chat/SelectedChatView.qml | 1 + 5 files changed, 62 insertions(+), 56 deletions(-) diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index 29cc2a34f..8a1361849 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -2086,13 +2086,13 @@ ChatDroppableTextArea - + chat_view_send_area_placeholder_text Say something… : placeholder text for sending message text area - + cannot_record_while_in_call_tooltip Cannot record a message while a call is ongoing @@ -2101,65 +2101,65 @@ ChatListView - + chat_message_is_writing_info %1 is writing… - + chat_message_draft_sending_text - + chat_room_delete "Delete" Löschen - + chat_room_mute - + chat_room_unmute "Mute" - + chat_room_mark_as_read "Mark as read" - + chat_room_leave "leave" - + chat_list_leave_chat_popup_title leave the conversation ? - + chat_list_leave_chat_popup_message You will not be able to send or receive messages in this conversation anymore. Do You want to continue ? - + chat_list_delete_chat_popup_title Delete the conversation ? - + chat_list_delete_chat_popup_message This conversation and all its messages will be deleted. Do You want to continue ? @@ -5975,25 +5975,25 @@ Pour les activer dans un projet commercial, merci de nous contacter. - + shared_medias_title Shared medias - + shared_documents_title Shared documents - + forward_to_title Forward to… - + conversations_title Conversations Konversationen diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index fb44098fa..524f9dbb1 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -2079,13 +2079,13 @@ ChatDroppableTextArea - + chat_view_send_area_placeholder_text Say something… : placeholder text for sending message text area Say something… - + cannot_record_while_in_call_tooltip Cannot record a message while a call is ongoing Cannot record a message while a call is ongoing @@ -2094,65 +2094,65 @@ ChatListView - + chat_message_is_writing_info %1 is writing… %1 is writing… - + chat_message_draft_sending_text Draft : %1 - + chat_room_delete "Delete" Delete - + chat_room_mute Mute - + chat_room_unmute "Mute" Unmute - + chat_room_mark_as_read "Mark as read" Mark as read - + chat_room_leave "leave" Leave - + chat_list_leave_chat_popup_title leave the conversation ? Leave the conversation ? - + chat_list_leave_chat_popup_message You will not be able to send or receive messages in this conversation anymore. Do You want to continue ? You will not be able to send or receive messages in this conversation anymore. Do You want to continue ? - + chat_list_delete_chat_popup_title Delete the conversation ? Delete the conversation ? - + chat_list_delete_chat_popup_message This conversation and all its messages will be deleted. Do You want to continue ? This conversation and all its messages will be deleted. Do You want to continue ? @@ -5891,25 +5891,25 @@ To enable them in a commercial project, please contact us. Message beeing edited - + shared_medias_title Shared medias Shared medias - + shared_documents_title Shared documents Shared documents - + forward_to_title Forward to… Forward to… - + conversations_title Conversations Conversations diff --git a/Linphone/data/languages/fr.ts b/Linphone/data/languages/fr.ts index 20214c813..95dd82c87 100644 --- a/Linphone/data/languages/fr.ts +++ b/Linphone/data/languages/fr.ts @@ -2054,13 +2054,13 @@ ChatDroppableTextArea - + chat_view_send_area_placeholder_text Say something… : placeholder text for sending message text area Dites quelque chose… - + cannot_record_while_in_call_tooltip Cannot record a message while a call is ongoing Impossible d'enregistrer un message vocal pendant un appel @@ -2069,65 +2069,65 @@ ChatListView - + chat_message_is_writing_info %1 is writing… %1 est en train d'écrire… - + chat_message_draft_sending_text Brouillon : %1 - + chat_room_delete "Delete" Supprimer - + chat_room_mute Mettre en sourdine - + chat_room_unmute "Mute" Enlever la sourdine - + chat_room_mark_as_read "Mark as read" Marquer comme lu - + chat_room_leave "leave" Quitter la conversation - + chat_list_leave_chat_popup_title leave the conversation ? Quitter la conversation ? - + chat_list_leave_chat_popup_message You will not be able to send or receive messages in this conversation anymore. Do You want to continue ? Vous ne pourrez plus envoyer ou recevoir de messages dans cette conversation. Souhaitez-vous continuer ? - + chat_list_delete_chat_popup_title Delete the conversation ? Supprimer la conversation ? - + chat_list_delete_chat_popup_message This conversation and all its messages will be deleted. Do You want to continue ? La conversation et tous ses messages seront supprimés. Souhaitez-vous continuer ? @@ -5862,25 +5862,25 @@ Pour les activer dans un projet commercial, merci de nous contacter.Modification du message - + shared_medias_title Shared medias Médias partagés - + shared_documents_title Shared documents Documents partagés - + forward_to_title Forward to… Transférer à… - + conversations_title Conversations Conversations diff --git a/Linphone/view/Control/Input/Chat/ChatDroppableTextArea.qml b/Linphone/view/Control/Input/Chat/ChatDroppableTextArea.qml index 19fd372b3..ff8bf46d6 100644 --- a/Linphone/view/Control/Input/Chat/ChatDroppableTextArea.qml +++ b/Linphone/view/Control/Input/Chat/ChatDroppableTextArea.qml @@ -65,6 +65,7 @@ Control.Control { rightPadding: Utils.getSizeWithScreenRatio(15) topPadding: Utils.getSizeWithScreenRatio(16) bottomPadding: Utils.getSizeWithScreenRatio(16) + background: Rectangle { anchors.fill: parent color: DefaultStyle.grey_100 @@ -99,9 +100,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) @@ -122,7 +121,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 @@ -130,6 +128,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; @@ -143,13 +148,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 3ef4db620..f43a911c8 100644 --- a/Linphone/view/Page/Form/Chat/SelectedChatView.qml +++ b/Linphone/view/Page/Form/Chat/SelectedChatView.qml @@ -521,6 +521,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