A single line of code to automate rectangle rounding.
Rectangle with rounded edges

Create a rectangle with automated rounded edges :



You need a rectangle with rounded edges, to which you add the following expression to the "Rounded" attribute:

rect = content(1).content(1).size;
(rect[0] < rect[1]) ? rect[0] / 2 : rect[1] / 2;

You can now freely change the rectangle size and the rounding will change automatically.

Credits