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