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.

14 Likes

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

7 Likes