mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 01:07:52 -06:00
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.
This commit is contained in:
parent
05b32548f3
commit
dfe55b8f23
1 changed files with 13 additions and 1 deletions
|
@ -139,7 +139,19 @@ Cura.ExpandableComponent
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
width: parent.width
|
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
|
AutoConfiguration
|
||||||
{
|
{
|
||||||
id: autoConfiguration
|
id: autoConfiguration
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue