When padding is set on a child element, a parent container with
adaptWidthToChildren = true doesn’t factor in the child’s padding.
Note also the commented out lines where you can workaround the problem by adding negative padding to the parent container, which is counter-intuitive.
I assume the same applies to
adaptHeightToChildren but I haven’t tested it.