UI Scale Should work as a Child to UI Layouts

As a Roblox developer, it is currently too hard to resize UI objects that have offset scaling within them.

Let’s say we have 2 different objects. One that uses only scale, and one that uses offset:


As you can see, the object with only scale looks hideous when scaled past its native size. The proportions aren’t correct, and everything looks squished. Some things even start clipping off the main frame!
On the other hand, the frame using offset keeps its proportions and has the desired padding, even though it’s scaled past its native size.


The problem is that if I try scaling the frames using offset while having the CellSize of the UIGridLayout changed to a smaller ratio of the original size it will cause problems ( As I’ve stated above, I want to preserve the behaviour of the card that uses offset). Inserting a UIScale into each frame will scale the entire frame, but won’t keep the padding in between different frames:

If Roblox is able to address this issue, it would improve my development experience because it would decrease the time developers need to take to scale frames for all devices. Instead of editing each individual frame using a script, changing the scale value of the UIScale object would suffice.

5 Likes

This is probably a limitation from how UIGridLayouts work. I suspect that since all GuiObject instances subject to one are “guaranteed” to be the same size, it doesn’t bother checking each individual instance as it could get very expensive if many exist.

A workaround for now would be using a UIAspectRatioConstraint. Since cards should always be the same ratio, using one will preserve the look of the card and ensure uniform scaling, even when scale is used.

2 Likes

Although this approach would fix some of the problems, it wouldn’t fix all of the problems.

What I’m targeting is changing the aspect ratio while retaining visual clarity. I guess the only workaround is to use scripts or some other hacky way to achieve the desired result. Thanks for the opinion!