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.
This commit is contained in:
Julien Wadel 2022-09-06 13:40:39 +02:00
parent e5d5a9c0e8
commit aacf48cf19

View file

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