From aacf48cf1922d666202052f980922ab500243477 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Tue, 6 Sep 2022 13:40:39 +0200 Subject: [PATCH] Fix having empty spaces in active speaker view on mini views. Remove workaround for refreshing list and move to begining of the list if contents fit the view. --- .../views/App/Calls/IncallActiveSpeaker.qml | 30 ++----------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml b/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml index 003bb6fa2..e8a009b5c 100644 --- a/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml +++ b/linphone-app/ui/views/App/Calls/IncallActiveSpeaker.qml @@ -96,39 +96,13 @@ Item { avatarStickerBackgroundColor: IncallStyle.container.avatar.stickerBackgroundColor avatarBackgroundColor: IncallStyle.container.avatar.backgroundColor } - /* - state: 'bottom' - states: [State { - name: "bottom" - - AnchorChanges { - target: preview - anchors.top: undefined - anchors.bottom: mainItem.bottom - } - }, - State { - name: "top" - - AnchorChanges { - target: preview - anchors.top: mainItem.top - anchors.bottom: undefined - } - }]*/ } Item{ anchors.right: parent.right anchors.top: parent.top anchors.bottom: preview.top anchors.rightMargin: 30 -// WORKAROUND to fix a Qt's bug on not refreshing layout to bottom when loading listview. - property int estimatedHeight: miniViews.count * (miniViews.cellHeight+miniViews.spacing)-miniViews.spacing - property int unusedHeight : Math.max(0, parent.height// Main Height - -preview.height-preview.anchors.topMargin-preview.anchors.bottomMargin// Preview height - -30 // margins - -estimatedHeight)// contents height - anchors.topMargin: 15 + unusedHeight + anchors.topMargin: 15 //--------------- anchors.bottomMargin: 15 @@ -144,6 +118,8 @@ Item { } spacing: 15 verticalLayoutDirection: ListView.BottomToTop + fitCacheToContent: false + onCountChanged: if(contentItem.height < miniViews.height) positionViewAtBeginning() delegate:Item{ height: miniViews.cellHeight width: miniViews.width