AutomaticSize behaves incorrectly with UIGridStyleLayouts and UIScale

With UIScale values below 1, frames which use AutomaticSize become increasingly larger and more offset from their actual bounds.
image
The above image has a gray container frame with white frames and a UIGridLayout inside. On UIScale.Scale < 1, the size of the gray container set by AutomaticSize becomes increasingly more incorrect:

The above occurs specifically only with UIListLayouts, whose Wraps property is true and FillDirection is Horizontal:

Any other setting combination for UIListLayouts works fine, however. The following image has FillDirection set to Vertical, with Wraps still enabled:
image
Changing the container frames AutomaticSize to X does not cause the bug to occur either, which leads me to believe this bug is isolated on the Y-axis only.

Notably, the bug only occurs when the UIScale is applied either on the gray container frame itself, or its direct parent. If the UIScale is applied any higher up the hierarchy, such as the ScreenGui in the demo file, then it works as expected.

The following demo file was used to take all of the above images and videos. Within it, a ScreenGui with two bugged and one working-as-intended UIs are parented under StarterGui.
UI_Bug_Repro.rbxl (57.6 KB)

Expected behavior

I would expect the AutomaticSize to respect the UIScale applied on its frame, and have the gray container be the same size as however many white frames there are.

4 Likes

Hi @PysephDEV , do you know when you started to notice this issue occurring?

Unfortunately I have no idea, as I previously did not use UIGridStyleLayouts in conjunction with UIScale before. The earliest was two hours ago, when I first worked on the UI.

To better understand and investigate this issue, I would like to clarify: Was this UI functioning correctly before and only recently started malfunctioning, or has it not been behaving as expected since you created it? Thanks

it has not been behaving correctly ever since I’ve created it.

1 Like

Thanks for the info! We have filed a ticket and will look into the issue. Meanwhile, our new feature UIListLayout Flex is going to be released soon, hopefully we can get a nice workaround with that first!

2 Likes