summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Cory Forsstrom <cforsstrom18@gmail.com>2023-01-05 08:57:38 -0800
committerLibravatar Cory Forsstrom <cforsstrom18@gmail.com>2023-01-05 08:57:38 -0800
commitc885f567488db95b8d96e343f1cf746838e9fa4e (patch)
treee720486c653651dbe5197ed941c9712ae7779174
parent43374f1f4e865094032946907dbcf7569ee9487d (diff)
downloadiced-c885f567488db95b8d96e343f1cf746838e9fa4e.tar.gz
iced-c885f567488db95b8d96e343f1cf746838e9fa4e.tar.bz2
iced-c885f567488db95b8d96e343f1cf746838e9fa4e.zip
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.
-rw-r--r--lazy/src/responsive.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/lazy/src/responsive.rs b/lazy/src/responsive.rs
index 945c935a..52badda2 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