Skip to content
Snippets Groups Projects
Commit 216f10b6 authored by Aline Gondim Santos's avatar Aline Gondim Santos
Browse files

participantslayer: fix binding loop

When changing the sizes of the splitview parts, the margin and
width were defined such as to cause a binding loop.

Change-Id: I41e0c55c0fef5563516c6d4b2f06eb1ebda5cdba
parent 0ac51833
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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