From b2aa7076bb324be4794d4a318e73bfaeab6542bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= Date: Fri, 9 Sep 2022 10:53:52 -0400 Subject: [PATCH] conference: improve layout for 2 people Change-Id: I88d67b8fef7363e3c483fe3e0719866907eaaafc GitLab: #732 --- src/app/mainview/components/ParticipantsLayoutHorizontal.qml | 2 +- src/app/mainview/components/ParticipantsLayoutVertical.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/mainview/components/ParticipantsLayoutHorizontal.qml b/src/app/mainview/components/ParticipantsLayoutHorizontal.qml index 645728ad..8177921c 100644 --- a/src/app/mainview/components/ParticipantsLayoutHorizontal.qml +++ b/src/app/mainview/components/ParticipantsLayoutHorizontal.qml @@ -218,7 +218,7 @@ SplitView { property int columns: { if (inLine) return 1 - var ratio = Math.floor(root.width / root.height) + var ratio = Math.round(root.width / root.height) // If ratio is 2 we can have 2 times more elements on each columns var wantedCol = Math.max(1, Math.round(Math.sqrt(commonParticipants.count) * ratio)) var cols = Math.min(commonParticipants.count, wantedCol) diff --git a/src/app/mainview/components/ParticipantsLayoutVertical.qml b/src/app/mainview/components/ParticipantsLayoutVertical.qml index 8138ea19..9c152606 100644 --- a/src/app/mainview/components/ParticipantsLayoutVertical.qml +++ b/src/app/mainview/components/ParticipantsLayoutVertical.qml @@ -137,7 +137,7 @@ SplitView { property int columns: { if (inLine) return commonParticipants.count - var ratio = Math.floor(root.width / root.height) + var ratio = Math.round(root.width / root.height) // If ratio is 2 we can have 2 times more elements on each columns var wantedCol = Math.max(1, Math.round(Math.sqrt(commonParticipants.count) * ratio)) var cols = Math.min(commonParticipants.count, wantedCol)