From dfe55b8f23b90fcdac812fc97a62e22bfcf6eea9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 7 Dec 2018 12:59:51 +0100 Subject: [PATCH] Fix height of expandable component adapting to contents Since the children don't adjust their height based on if they are visible (which would cause a binding loop) we just need to adjust the height of the total menu based on which children are visible. Easy enough. Contributes to issue CURA-5876. --- .../Menus/ConfigurationMenu/ConfigurationMenu.qml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml index 9bef2ca0be..5780649423 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml @@ -139,7 +139,19 @@ Cura.ExpandableComponent Item { width: parent.width - height: childrenRect.height + height: + { + var height = 0; + if(autoConfiguration.visible) + { + height += autoConfiguration.height; + } + if(customConfiguration.visible) + { + height += customConfiguration.height; + } + return height; + } AutoConfiguration { id: autoConfiguration