diff --git a/src/widget/autosize.rs b/src/widget/autosize.rs index e9ed4d0bd4b..8c65e5c00cc 100644 --- a/src/widget/autosize.rs +++ b/src/widget/autosize.rs @@ -230,9 +230,12 @@ where renderer: &Renderer, translation: Vector, ) -> Option> { - self.content - .as_widget_mut() - .overlay(&mut tree.children[0], layout, renderer, translation) + self.content.as_widget_mut().overlay( + &mut tree.children[0], + layout.children().next().unwrap(), + renderer, + translation, + ) } fn drag_destinations( diff --git a/src/widget/id_container.rs b/src/widget/id_container.rs index ae19d0889cb..ae30289f724 100644 --- a/src/widget/id_container.rs +++ b/src/widget/id_container.rs @@ -165,9 +165,12 @@ where renderer: &Renderer, translation: Vector, ) -> Option> { - self.content - .as_widget_mut() - .overlay(&mut tree.children[0], layout, renderer, translation) + self.content.as_widget_mut().overlay( + &mut tree.children[0], + layout.children().next().unwrap(), + renderer, + translation, + ) } fn drag_destinations(