mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-23 08:13:51 +02:00
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
This commit is contained in:
parent
68e8ad46aa
commit
a75f8c2356
1 changed files with 6 additions and 3 deletions
|
@ -174,10 +174,13 @@ Item {
|
||||||
}
|
}
|
||||||
property int rows: Math.max(1, Math.ceil(commonParticipants.count/columns))
|
property int rows: Math.max(1, Math.ceil(commonParticipants.count/columns))
|
||||||
property int componentWidth: {
|
property int componentWidth: {
|
||||||
if (inLine)
|
|
||||||
return height
|
|
||||||
var totalSpacing = commonParticipantsFlow.spacing * commonParticipantsFlow.columns
|
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 {
|
Repeater {
|
||||||
|
|
Loading…
Add table
Reference in a new issue