From c885f567488db95b8d96e343f1cf746838e9fa4e Mon Sep 17 00:00:00 2001 From: Cory Forsstrom Date: Thu, 5 Jan 2023 08:57:38 -0800 Subject: [PATCH] Fix shadowed variable Layout passed into the overlay was accidentally shadowed by the content's layout. So instead of offsetting by the proper layout, the content layout was used instead. --- lazy/src/responsive.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lazy/src/responsive.rs b/lazy/src/responsive.rs index 945c935aef..52badda24a 100644 --- a/lazy/src/responsive.rs +++ b/lazy/src/responsive.rs @@ -280,12 +280,14 @@ where ); let Content { - element, layout, .. + element, + layout: content_layout, + .. } = content.deref_mut(); let content_layout = Layout::with_offset( layout.bounds().position() - Point::ORIGIN, - layout, + content_layout, ); element