UIListLayout adds extra padding to an automatic sizing parent frame if the 1st element is not visible

Description

I’ve never noticed this before, but if you have a UIListLayout with gui elements and the 1st element’s Visible property is set to false, it will add extra padding to an automatic sizing parent frame when it is not supposed to. This still happens as of 20 November 2023.

It is easily reproducible and explained on how to replicate and examples below.

Replication and Examples

Here is an example of a UI of it working properly:
Frame has it’s Size set to {0, 0},{0, 0} and AutomaticSize set to XY.
Inside it is a UIListLayout with it’s Padding set to 0, 10, SortOrder set to LayoutOrder (note that this still happens with the Name SortOrder), along with 3 TextLabels with it’s LayoutOrder set accordingly.

TextLabel 2 and 3’s Visible property set to false, working as expected:

TextLabel 1’s Visible property set to false, adding an extra padding of 10 pixels on the bottom:

TextLabel 1 and 2’s Visible property set to false, still having the same padding issue:

Real Examples

Working as expected:

1st elements are removed:

Conclusion

Any combination of elements will work properly as long as the 1st element’s Visible property is set to true.

One way to combat this is completely destroying the element if it’s not visible, but it is much easier for me to tick a property rather than recloning elements.

4 Likes

We’ve filed a ticket into our internal database for this issue, and we will update you when we have further information!

Thanks for the report!

2 Likes

I really hope this ever gets resolved with the Flex features.

Hi, I believe this bug should be fixed now! If you get a chance, can you please verify it is fixed? Thanks!

1 Like

Not OP, but can verify it is fixed.

1 Like