From e40a219b53d5ae414bea28fec3b14903aea573e2 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 1 Apr 2022 11:36:22 +0200 Subject: [PATCH] Add back code for resizing contentContainer. This makes sure that the background get smaller when the setting container is resized. CURA-8640 --- resources/qml/ExpandableComponent.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/resources/qml/ExpandableComponent.qml b/resources/qml/ExpandableComponent.qml index 3742c6d5e5..6717be94a5 100644 --- a/resources/qml/ExpandableComponent.qml +++ b/resources/qml/ExpandableComponent.qml @@ -307,4 +307,16 @@ Item contentItem: Item {} } } + + // DO NOT MOVE UP IN THE CODE: This connection has to be here, after the definition of the content item. + // Apparently the order in which these are handled matters and so the height is correctly updated if this is here. + Connections + { + // Since it could be that the content is dynamically populated, we should also take these changes into account. + target: content.contentItem + function onHeightChanged() + { + contentContainer.height = contentHeader.height + content.height + } + } }