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)
This commit is contained in:
Julien Wadel 2022-06-29 13:18:15 +02:00
parent d4be006a8c
commit 76eb8014e0
2 changed files with 9 additions and 1 deletions

View file

@ -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 &&

View file

@ -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
}