Why does padding get removed when user widgets are placed in other user widgets?

If I add padding to my user widget, it gets removed when I place it in the design of another user widget:

In the above example, the middle user widget is placed in the left user widget, where the padding gets removed (or actually, it causes the user widget to shrink, despite it being surrounded by a size box with width and height overrides).

Similarly, I have tried to place the padding on the right user widget, but then it gets removed when that widget is placed in the middle user widget.

Why is this?

But you’re not adding padding to the user widget. That padding belongs to the slot the container creates for the widget (you can see slot type in parenthesis). A grid creates a grid slot and you can pad the widget inside. A vertical box would produce another type of slot that can also be padded.

Above, these two are completely different slots. The user widget has no idea what’s going on, it does not even know that it is being padded. It can be queried, though.


You could add padding to the user widget itself, but that needs to be done inside the use widget, not inside the container’s slot.

1 Like

Thank you for the explanation!

Using that information I managed to get the result I wanted, by adding a border with padding to the inner-most user widget:

So that means this is the same case, where I’m trying to push a user widget down in my layout, but in the menu where it ultimately ends up, the slot doesn’t allow that:

This is a tricky thing to figure out what thing goes where and when it will work! It’s not 100% WYSIWYG imo. Or rather, things can override other things and what does that is not obvious.

1 Like

There is one more method for handling this. If you know upfront what kind of container the user widget would end up in, you could:

The user widget can check what kind of parent slot it ended up in, and suggest a padding value. Untested, but should work.


This is a tricky thing to figure out what thing goes where and when it will work! It’s not 100% WYSIWYG imo.

And yes, if you’re reparenting widgets, things can get tricky.

1 Like