mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 04:49:04 +08: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
@ -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…
x
Reference in New Issue
Block a user