Popup will now resize based on the implicitWidth/implicitHeight of it's children.

This causes a binding loop when using layouts like Column.

To resolve this the height/width of the popup in ExpandablePopup can now be set explicitly with contentWidth and contentHeight

For ExpandablePopups with contentItems that are not Layouts the implicitWidth/implicitHeight can be set directly in the contentItem.

CURA-8640
This commit is contained in:
j.delarago 2022-04-01 09:31:27 +02:00
parent 2c09c83896
commit cfad991120
5 changed files with 14 additions and 35 deletions

View file

@ -111,13 +111,13 @@ Item
//The column doesn't automatically listen to its children rect if the children change internally, so we need to explicitly update the size.
onChildrenRectChanged:
{
popup.height = childrenRect.height
popup.width = childrenRect.width
popup.implicitHeight = childrenRect.height
popup.implicitWidth = childrenRect.width
}
onPositioningComplete:
{
popup.height = childrenRect.height
popup.width = childrenRect.width
popup.implicitHeight = childrenRect.height
popup.implicitWidth = childrenRect.width
}
Repeater