From 76eb8014e0c003c13277bf7cb5bf7fa1a69492ca Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Wed, 29 Jun 2022 13:18:15 +0200 Subject: [PATCH] Add an option to hide Handler on Paned. Call view: - Hide right splitter if no chat or in conference (TODO: special case when transferring). - Hide left splitter if closed and in videoconference (openable with button) --- linphone-app/ui/modules/Common/Misc/Paned.qml | 4 +++- linphone-app/ui/views/App/Calls/CallsWindow.qml | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/linphone-app/ui/modules/Common/Misc/Paned.qml b/linphone-app/ui/modules/Common/Misc/Paned.qml index cc129096d..6052042a5 100644 --- a/linphone-app/ui/modules/Common/Misc/Paned.qml +++ b/linphone-app/ui/modules/Common/Misc/Paned.qml @@ -34,6 +34,7 @@ Item { property bool resizeAInPriority: false property int closingEdge: Qt.LeftEdge // `LeftEdge` or `RightEdge`. property int defaultChildAWidth + property bool hideSplitter: false // User limits: string or int values. // By default: no limits. @@ -264,12 +265,13 @@ Item { id: handle property int _mouseStart + visible: !container.hideSplitter anchors.left: contentA.right cursorShape: Qt.SplitHCursor height: parent.height hoverEnabled: true - width: PanedStyle.handle.width + width: visible ? PanedStyle.handle.width : 0 onDoubleClicked: _inverseClosingState() onMouseXChanged: pressed && diff --git a/linphone-app/ui/views/App/Calls/CallsWindow.qml b/linphone-app/ui/views/App/Calls/CallsWindow.qml index 71226b985..9bb975ab8 100644 --- a/linphone-app/ui/views/App/Calls/CallsWindow.qml +++ b/linphone-app/ui/views/App/Calls/CallsWindow.qml @@ -38,6 +38,7 @@ Window { readonly property bool callsIsOpened: !mainPaned.isClosed() + // --------------------------------------------------------------------------- function openChat () { @@ -83,6 +84,8 @@ Window { maximumLeftLimit: CallsWindowStyle.callsList.maximumWidth minimumLeftLimit: CallsWindowStyle.callsList.minimumWidth + hideSplitter: !window.callsIsOpened && middlePane.sourceComponent == videoConference + // ------------------------------------------------------------------------- // Calls list. // ------------------------------------------------------------------------- @@ -181,6 +184,8 @@ Window { minimumRightLimit: CallsWindowStyle.chat.minimumWidth resizeAInPriority: true + hideSplitter: !middlePane.sourceComponent || middlePane.sourceComponent == videoConference || !rightPane.sourceComponent + // ----------------------------------------------------------------------- Component { @@ -268,6 +273,7 @@ Window { } childB: Loader { + id: rightPane anchors.fill: parent sourceComponent: window.call && window.call.chatRoomModel ? chat : null }