Skip to content

Commit

Permalink
manually calculation of children width
Browse files Browse the repository at this point in the history
we can't limit flow width by parent width for calculating children width, because we need inverse dependency
  • Loading branch information
Eism committed Oct 15, 2024
1 parent b03599e commit 074eeaf
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,23 @@ Rectangle {

anchors.verticalCenter: parent.verticalCenter

width: {
var result = 0
var children = content.children

for (var i = 0; i < children.length; ++i) {
result += children[i].width + spacing

}

if (result > 0) {
result -= spacing
}

return result
}
height: childrenRect.height

clip: true
spacing: 4

Expand Down

0 comments on commit 074eeaf

Please sign in to comment.