AutomaticSize doesn't respect UIPadding

AutomaticSize does not respect UIPadding.

Image of TextLabel within an ImageButton. Both are using AutomaticSize in Y and no UIPadding child:
image

Image of TextLabel within an ImageButton. Both are using AutomaticSize in Y. There is a UIPadding child under the ImageButton parent (it’s a sibling of TextLabel):
image

I tried working around this by placing the UIPadding as a child of the TextLabel itself, but then the text gets cut off prematurely:
image

It seems that AutomaticSize simply does not respect the UIPadding element at this time. It would be great to see this accounted for in the future!

4 Likes

I can verify this, it does not respect it.

1 Like

The Size property limits the minimum size that AutomaticSize will set on a GuiObject, maybe you have Size set to something. Otherwise I couldn’t replicate this;
image
do you think you could send a model/place file?

Yes I had a minimum size set, but that doesn’t change the fact that the box should have expanded to fit the text with the padding accounted for as well.

Thanks for the report! I filed a ticket in our internal database.

1 Like