diff --git a/src/app/mainview/components/ParticipantsLayer.qml b/src/app/mainview/components/ParticipantsLayer.qml index f4f761391b3141da5d1be1b46e91ec0db2fe4e37..5881c7f64567fc52d067d3be33fc33a9a2971000 100644 --- a/src/app/mainview/components/ParticipantsLayer.qml +++ b/src/app/mainview/components/ParticipantsLayer.qml @@ -162,6 +162,7 @@ Item { } Item { + id: centerItem Layout.fillHeight: true Layout.fillWidth: true Layout.margins: 4 @@ -171,13 +172,6 @@ Item { id: commonParticipantsFlow anchors.fill: parent - anchors.leftMargin: { - if (!inLine) - return 0 - var showed = Math.min(genericParticipantsRect.showable, columns) - return Math.max(0, Math.ceil((parent.width - componentWidth * showed) / 2)) - } - spacing: 4 property int columns: { if (inLine) @@ -196,11 +190,21 @@ Item { var w = Math.floor((commonParticipantsFlow.width - totalSpacing)/ commonParticipantsFlow.columns) if (inLine) { w = Math.max(w, height) - w = Math.min(w, height * 4 / 3) // Avoid to wide elements + w = Math.min(w, height * 4 / 3) // Avoid too wide elements } return w } + Item { + height: parent.height + width: { + if (!inLine) + return 0 + var showed = Math.min(genericParticipantsRect.showable, commonParticipantsFlow.columns) + return Math.max(0, Math.ceil((centerItem.width - commonParticipantsFlow.componentWidth * showed) / 2)) + } + } + Repeater { id: commonParticipants