From c3aa67cd1e4734d797a86e1b1e10fce942efaa7d Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Tue, 17 Jan 2023 17:22:41 +0100 Subject: [PATCH] Hide Active speaker in mini views. Better fix on refreshing layout when Qt doesn't do it. # Conflicts: # CHANGELOG.md --- CHANGELOG.md | 6 +++- .../views/App/Calls/IncallActiveSpeaker.qml | 34 +++++++++---------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d1332fc6..c0ce510c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - ## 5.1.0 - undefined ### Added @@ -18,6 +17,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Movable on holding mouse's left click. * Resizeable on mouse's wheel. * Reset on mouse's right click (first for size if changed, second for position) +- Hide the active speaker from the mini views. + +### Fixed +- Mini views layout on actives speaker. +- Set 1 month to default message expires. ## 5.0.6 - 2023-01-10 diff --git a/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml b/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml index 5b10da12e..7868c90bd 100644 --- a/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml +++ b/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml @@ -132,7 +132,7 @@ Item { anchors.bottom: preview.top anchors.rightMargin: 30 anchors.topMargin: 15 - anchors.bottomMargin: 15 + anchors.bottomMargin: 0 //--------------- width: 16 * miniViews.cellHeight / 9 visible: mainItem.isConferenceReady || !callModel.isConference @@ -142,31 +142,29 @@ Item { property int cellHeight: 150 anchors.fill: parent model : mainItem.callModel.isConference && mainItem.participantDevices.count > 1 ? mainItem.participantDevices : [] - spacing: 15 + spacing: 0 verticalLayoutDirection: ListView.BottomToTop fitCacheToContent: false - onCountChanged: updateView() - onHeightChanged: updateView() - function updateView(){ - if(contentItem.height < miniViews.height){ - contentItem.y = miniViews.height // Qt workaround because it do not set correctly value with positionning to beginning - } - } - Component.onCompleted: updateView() - Timer{ - running: true - interval: 500 - repeat: true - onTriggered: miniViews.updateView() + property int oldCount : 0// Count changed can be called without a change... (bug?). Use oldCount to avoid it. + onCountChanged: {if(oldCount != count){ oldCount = count ; Qt.callLater(forceRefresh)}} + onHeightChanged: Qt.callLater(forceRefresh) + function forceRefresh(){// Force a content refresh via layout direction. Qt is buggy when managing sizes in ListView. + miniViews.verticalLayoutDirection = ListView.TopToBottom + miniViews.verticalLayoutDirection = ListView.BottomToTop } + Component.onCompleted: {Qt.callLater(forceRefresh)} delegate:Item{ - height: miniViews.cellHeight - width: miniViews.width + height: visible ? miniViews.cellHeight + 15 : 0 + width: visible ? miniViews.width : 0 + visible: cameraView.currentDevice != modelData clip:false Sticker{ id: miniView anchors.fill: parent - anchors.margins: 3 + anchors.topMargin: 3 + anchors.leftMargin: 3 + anchors.rightMargin: 3 + anchors.bottomMargin: 18 deactivateCamera: (!mainItem.isConferenceReady || !callModel.isConference) && (index <0 || !mainItem.cameraEnabled || (!modelData.videoEnabled) || (callModel && callModel.pausedByUser) ) currentDevice: modelData.isPreview ? null : modelData