Implement Stack widget

It can be used to stack elements on top of each other!
This commit is contained in:
Héctor Ramón Jiménez 2024-04-25 01:39:34 +02:00
parent 5ef593ce53
commit 0c74d26456
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
4 changed files with 357 additions and 2 deletions

View file

@ -54,7 +54,7 @@ impl<'a> Layout<'a> {
}
/// Returns an iterator over the [`Layout`] of the children of a [`Node`].
pub fn children(self) -> impl Iterator<Item = Layout<'a>> {
pub fn children(self) -> impl DoubleEndedIterator<Item = Layout<'a>> {
self.node.children().iter().map(move |node| {
Layout::with_offset(
Vector::new(self.position.x, self.position.y),