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

ParticipantsLayer: make participants in line more flexibles

All cards where a square when using layout with One big and smalls
This can be improved and be more flexible.

Change-Id: I87868480496289566714ddbe22a5bce31f387dcb
parent 68e8ad46
No related branches found
No related tags found
No related merge requests found
......@@ -174,10 +174,13 @@ Item {
}
property int rows: Math.max(1, Math.ceil(commonParticipants.count/columns))
property int componentWidth: {
if (inLine)
return height
var totalSpacing = commonParticipantsFlow.spacing * commonParticipantsFlow.columns
return Math.floor((commonParticipantsFlow.width - totalSpacing)/ commonParticipantsFlow.columns)
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
}
return w
}
Repeater {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment