Reproduction Steps
When a ScrollingFrame
, with AutomaticSize
and AutomaticCanvasSize
set to true
, and a UIListLayout
, is populated with GuiObjects
that have a UIPadding
instance inside of them, both AutomaticSize
and AutomaticCanvasSize
display inaccurate results.
All four of the TextLabel
s inside of the ScrollingFrame
have a Size of UDim2.new(1, 0, 0, 50)
and a UIPadding
with 5 pixels on each side (10 pixels total on the Y axis). The TextLabel
's AbsoluteSize
is Vector2.new(X, 50)
(accurately not accounting for the UIPadding
), which means that the ScrollingFrame
's AbsoluteCanvasSize
should be Vector2.new(X, 200)
.
The ScrollingFrame
's actual AbsoluteCanvasSize
is Vector2.new(X, 240)
. The 40
additional pixels on the Y axis come from the 10 pixels padding each of the four TextLabels
.
Without the UIListLayout
, the AbsoluteCanvasSize
is Vector2.new(X, 210)
, which means that AutomaticCanvasSize
is only accounting for UIPadding
This should not be the case because Padding does not add size to GuiObjects
.
I have added a place file that has the steps to reproduce this issue.
In the place file, there are already UIPadding
instances inside of all of the TextLabels
. If you delete all of the UIPadding
instances, AutomaticSize
and AutomaticCanvasSize
will behave as expected.
AutomaticSizeIssue.rbxl (43.6 KB)
Expected Behavior
I expect for AutomaticSize
and AutomaticCanvasSize
to not use UIPadding
of children GuiObject
s, as UIPadding
does not increase the Size
of them.
Actual Behavior
AutomaticSize
and AutomaticCanvasSize
produce inaccurate results when calculating the AbsoluteSize
and AbsoluteCanvasSize
when calculating for a GuiObject
that has children with UIPadding
instances inside of them.
Issue Area: Engine
Issue Type: Display
Impact: High
Frequency: Constantly
Date First Experienced: 2022-08-02 00:08:00 (-05:00)
Date Last Experienced: 2022-08-02 00:08:00 (-05:00)