diff --git a/CMakeLists.txt b/CMakeLists.txt index fdb8c6f3b..0ccd32a98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,10 +169,11 @@ set(ENABLE_CXX_WRAPPER ON CACHE BOOL "Build the C++ wrapper for Liblinphone." FO set(ENABLE_THEORA OFF) set(ENABLE_QT_GL ${ENABLE_VIDEO}) -find_package(Qt5 5.12 COMPONENTS Core REQUIRED) +# Qt5.13 because of Spitview +find_package(Qt5 5.13 COMPONENTS Core REQUIRED) if(NOT Qt5_FOUND) - message(FATAL_ERROR "Minimum supported Qt5 version is 5.12!") + message(FATAL_ERROR "Minimum supported Qt5 version is 5.13!") endif() set(LINPHONEAPP_BUILD_TYPE "Default" CACHE STRING "Type of build") diff --git a/linphone-app/ui/modules/Common/Form/DroppableTextArea.qml b/linphone-app/ui/modules/Common/Form/DroppableTextArea.qml index c484a6ec3..98154cc55 100644 --- a/linphone-app/ui/modules/Common/Form/DroppableTextArea.qml +++ b/linphone-app/ui/modules/Common/Form/DroppableTextArea.qml @@ -163,8 +163,31 @@ Item { scrollBar.visible = true } } + Timer{ + id: clearDelay + property bool cleared: true + interval: 20 + repeat: false + onTriggered: if(!cleared && textArea.getText(0, textArea.text.length) == '') { + textArea.textFormat= TextEdit.PlainText + textArea.clear() + textArea.textFormat=TextEdit.RichText + cleared = true + } + + } + onTextChanged: { + if(clearDelay.cleared) { + var plainText = getText(0, text.length) + if( plainText == '') { + clearDelay.cleared = false + clearDelay.restart() + } + } + } function handleValidation () { - validText(getText(0, text.length)) // Remove rich format to send plain text + var plainText = getText(0, text.length) + validText(plainText) // Remove rich format to send plain text } background: Rectangle { diff --git a/linphone-app/ui/modules/Linphone/Account/AccountStatus.qml b/linphone-app/ui/modules/Linphone/Account/AccountStatus.qml index e695a68b2..9201fe1c6 100644 --- a/linphone-app/ui/modules/Linphone/Account/AccountStatus.qml +++ b/linphone-app/ui/modules/Linphone/Account/AccountStatus.qml @@ -96,10 +96,6 @@ Item { count: CoreManager.eventCount iconSize: AccountStatusStyle.messageCounter.iconSize pointSize: AccountStatusStyle.messageCounter.pointSize - MouseArea{ - anchors.fill: parent - onClicked: window.setView('HistoryView') - } } } }//RowLayout diff --git a/linphone-app/ui/modules/Linphone/Chat/Chat.qml b/linphone-app/ui/modules/Linphone/Chat/Chat.qml index 57eba4315..e0c28d1c4 100644 --- a/linphone-app/ui/modules/Linphone/Chat/Chat.qml +++ b/linphone-app/ui/modules/Linphone/Chat/Chat.qml @@ -1,5 +1,5 @@ import QtQuick 2.7 -import QtQuick.Controls 2.2 +import QtQuick.Controls 2.15 import QtQuick.Layouts 1.3 import Common 1.0 @@ -76,11 +76,10 @@ Rectangle { function goToMessageId(messageId){ positionViewAtIndex(container.proxyModel.loadTillMessageId(messageId)) } - - ColumnLayout { + SplitView{ anchors.fill: parent spacing: 0 - + orientation: Qt.Vertical ScrollableListView { id: chat // ----------------------------------------------------------------------- @@ -126,8 +125,8 @@ Rectangle { text: "X" } - Layout.fillHeight: true - Layout.fillWidth: true + SplitView.fillHeight: true + SplitView.fillWidth: true clip: false highlightFollowsCurrentItem: false // Use moving event => this is a user action. @@ -396,12 +395,11 @@ Rectangle { pointSize: Units.dp * 7 } } - } Rectangle { id: bottomChatBackground - Layout.fillWidth: true - Layout.preferredHeight: textAreaBorders.height + chatMessagePreview.height+messageBlock.height + chatEmojis.height + SplitView.fillWidth: true + SplitView.minimumHeight: textAreaBorders.minimumHeight + chatMessagePreview.height+messageBlock.height + chatEmojis.minimumHeight color: ChatStyle.sendArea.backgroundBorder.colorModel.color visible: proxyModel.chatRoomModel && !proxyModel.chatRoomModel.isReadOnly && (!proxyModel.chatRoomModel.haveEncryption && SettingsModel.standardChatEnabled || proxyModel.chatRoomModel.haveEncryption && SettingsModel.secureChatEnabled) @@ -420,6 +418,7 @@ Rectangle { ChatMessagePreview{ id: chatMessagePreview Layout.fillWidth: true + Layout.fillHeight: true Layout.leftMargin: ChatStyle.sendArea.backgroundBorder.width maxHeight: container.height - textAreaBorders.height replyChatRoomModel: proxyModel.chatRoomModel @@ -429,8 +428,11 @@ Rectangle { } ChatEmojis{ id: chatEmojis + property int minimumHeight: visible ? 150 : 0 onEmojiClicked: textArea.insertEmoji(emoji) Layout.fillWidth: true + Layout.fillHeight: true + Layout.minimumHeight: minimumHeight } // ------------------------------------------------------------------------- // Send area. @@ -438,8 +440,10 @@ Rectangle { Borders { id: textAreaBorders + property int minimumHeight: visible ? ChatStyle.sendArea.height + ChatStyle.sendArea.border.width : 0 Layout.fillWidth: true - Layout.preferredHeight: textArea.height + Layout.fillHeight: true + Layout.minimumHeight: minimumHeight Layout.leftMargin: ChatStyle.sendArea.backgroundBorder.width borderColor: ChatStyle.sendArea.border.colorModel.color topWidth: ChatStyle.sendArea.border.width @@ -450,11 +454,8 @@ Rectangle { enabled:proxyModel && proxyModel.chatRoomModel ? !proxyModel.chatRoomModel.isReadOnly:false isEphemeral : proxyModel && proxyModel.chatRoomModel ? proxyModel.chatRoomModel.ephemeralEnabled:false - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom + anchors.fill: parent - height: visible ? ChatStyle.sendArea.height + ChatStyle.sendArea.border.width : 0 minimumHeight:ChatStyle.sendArea.height + ChatStyle.sendArea.border.width maximumHeight:container.height/2 diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatEmojis.qml b/linphone-app/ui/modules/Linphone/Chat/ChatEmojis.qml index e7e8010ba..52f515da1 100644 --- a/linphone-app/ui/modules/Linphone/Chat/ChatEmojis.qml +++ b/linphone-app/ui/modules/Linphone/Chat/ChatEmojis.qml @@ -17,7 +17,6 @@ import 'Chat.js' as Logic Item{ id: mainItem visible: false - height: visible ? 150 : 0 //Layout.preferredHeight: visible ? 150 : 0 //Layout.maximumHeight: visible ? 150 : 0 signal emojiClicked(var emoji)