Invisible widgets in layout
I'm trying to contribute to Iced by making a grid layout and accompanying widget. I've gotten quite far however, I've run into an issue that I can't seem to solve on my own.
Using Element::explain() I can clearly see the borders of the child elements that seem to be where they're supposed to be and resizing as expected. The problem I'm seeing is that only the first Element of each group along the main axis renders and if I number the elements the ones that do render are all in sequence instead of skipping the invisible ones.
The behaviour I'm expecting is of course
| 0, Grid Element | 1, Grid Element | 2, Grid Element |
|---|---|---|
| 3, Grid Element | 4, Grid Element | 5, Grid Element |
Or at least 0 then 3 along the left-hand side.
Any help would be greatly appreciated. The code is available on my fork at strosel:grid
Since Element::explain renders the Layout tree, I think the issue here is most likely due to passing the incorrect layout children to the contents of the Grid in Widget::draw.
It would help if you could come up with an SSCCE of the issue!