Closed zicklag closed 3 years ago
investigating the issue right now! :D
ok, i see where the problem is - props are cloned so layout duplicates inside paper content box.
widget! {
(#{key} | {idref.cloned()} paper: {props.clone()} [
(#{"vertical"} vertical_box: {props.clone()} |[ listed_slots ]|)
])
}
that's gonna be easy fix for all paper versions of material widget, i'll just remove layout of wrapped container inside paper.
fixed! gonna reproduce that for every paper container and push the fix
Awesome, thanks!
introduced PaperContentLayoutProps that wraps ContentBoxItemlayout of paper children which is unwrapped and applied for each of them - previously this layout was cloned from paper node to its children which produced interla margins, etc. now you have to intentionally pass layout wrapped in PaperContentLayoutProps to make internal paper content layout.
pushed to next
branch 🎉
I think we can close this now. :)
I've got a simple example that shows a
ContentBoxItemLayout::margin
applied to avertical_paper
causes a margin to be applied to both the outside and the inside of the paper, instead of just the outside of the paper.Example Code
Screenshot
In the example above, we have applied the margin to the white box, and the red box is a child. The margin should space the white box away from the edges where the blue box is, like it is doing, but the red box on the inside of the white box should totally fill the white box, instead of having a margin, because we didn't apply a margin to the red box.