ScrollingFrame AutomaticCanvasSize Incorrect For UIGridLayout Having Cells With UISizeConstraint

If a UIGridLayout has cells with a UISizeConstraint, then the AutomaticCanvasSize is not calculated correctly for the ScrollingFrame.

The UIGridLayout respects any constraints you place on objects within the grid. For example, if an object has a UISizeConstraint with a MinSize property that is higher than the grid’s CellSize property, the object will span multiple cells.

Repro:
Attached file:
Repo.rbxl (59.2 KB)

Screenshot:
Notice how the bottom left element is clipped since the AutomaticCanvasSize is not calculated correctly.

Expected behavior

The AutomaticCanvasSize should take into account the custom grid cell sizes in order to calculate the correct canvas size.

Note this could be a problem with UIGridLayout not calculating its own AbsoluteContentSize properly.

  • In the above example, the AbsoluteContentSize.Y should be: 320 (big cell in row 1) + 20 (padding) + 320 (big cell in row 2) = 660

  • But instead, , the AbsoluteContentSize.Y is incorrectly calculated as: 320 (big cell in row 1) + 20 (padding) + 150 (small cell in row 2) = 490

  • Since this is the likely problem, I have created a new bug report here: UIGridLayout AbsoluteContentSize Incorrect When Having Cells With UISizeConstraint

2 Likes

This is just an acknowledgment announcement!

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

Thanks for flagging!