Skip to content
Snippets Groups Projects
Commit b2aa7076 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

conference: improve layout for 2 people

Change-Id: I88d67b8fef7363e3c483fe3e0719866907eaaafc
GitLab: #732
parent a95386e5
Branches
Tags
No related merge requests found
...@@ -218,7 +218,7 @@ SplitView { ...@@ -218,7 +218,7 @@ SplitView {
property int columns: { property int columns: {
if (inLine) if (inLine)
return 1 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 // 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 wantedCol = Math.max(1, Math.round(Math.sqrt(commonParticipants.count) * ratio))
var cols = Math.min(commonParticipants.count, wantedCol) var cols = Math.min(commonParticipants.count, wantedCol)
......
...@@ -137,7 +137,7 @@ SplitView { ...@@ -137,7 +137,7 @@ SplitView {
property int columns: { property int columns: {
if (inLine) if (inLine)
return commonParticipants.count 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 // 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 wantedCol = Math.max(1, Math.round(Math.sqrt(commonParticipants.count) * ratio))
var cols = Math.min(commonParticipants.count, wantedCol) var cols = Math.min(commonParticipants.count, wantedCol)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment