Add more scaling options to UIPadding

Currently with the UIPadding constraint, if you want to have the same padding on the horizontal axis as on the vertical axis, you have to use offset. Example using offset:
image
If you want to use a padding based on scale (so based on the user’s window size or parent UI element size) there is currently no easy way to make the horizontal and vertical padding the same size. This is due to the aspect ratio of most screens (because these are often not 1:1).

In this example, I put both the left and the bottom padding to the same value 0.02 (scale):
image
Notice how the padding on the left much bigger than the padding at the bottom, this is due to the aspect ratio of my screen.

My proposed solution would be to have an option that will make these padding distances the same. Possibly with an option to change the dominant axis too.

Currently as a developer to achieve this, you’d have to write a script that adjusts the scale values (bottom or left scale in this example) so they result in the same amount of pixels.

27 Likes

Bumping this, would be such a useful addition to UIPadding!

12 Likes

Bumping, this needs to be addressed, even though it’s such a simple feature.

1 Like

Big support, I use UIPadding ALL the time and it’s extremely hard to make it consistent on X and Y without being very particular with aspect ratios and frame sizes.

1 Like