diff --git a/widget/src/responsive.rs b/widget/src/responsive.rs index 46b77924..f0a3b949 100644 --- a/widget/src/responsive.rs +++ b/widget/src/responsive.rs @@ -113,7 +113,11 @@ where self.content.as_widget_mut().update( &mut tree.children[0], event, - layout.children().next().unwrap(), + layout + .children() + .next() + .unwrap() + .with_virtual_offset(layout.virtual_offset()), cursor, renderer, clipboard, @@ -137,7 +141,11 @@ where renderer, theme, style, - layout.children().next().unwrap(), + layout + .children() + .next() + .unwrap() + .with_virtual_offset(layout.virtual_offset()), cursor, viewport, ); @@ -153,7 +161,11 @@ where ) -> mouse::Interaction { self.content.as_widget().mouse_interaction( &tree.children[0], - layout.children().next().unwrap(), + layout + .children() + .next() + .unwrap() + .with_virtual_offset(layout.virtual_offset()), cursor, viewport, renderer, @@ -169,7 +181,11 @@ where ) { self.content.as_widget_mut().operate( &mut tree.children[0], - layout.children().next().unwrap(), + layout + .children() + .next() + .unwrap() + .with_virtual_offset(layout.virtual_offset()), renderer, operation, ); @@ -185,7 +201,11 @@ where ) -> Option> { self.content.as_widget_mut().overlay( &mut tree.children[0], - layout.children().next().unwrap(), + layout + .children() + .next() + .unwrap() + .with_virtual_offset(layout.virtual_offset()), renderer, viewport, translation, diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs index c6231dd6..e005a7b8 100644 --- a/widget/src/scrollable.rs +++ b/widget/src/scrollable.rs @@ -963,11 +963,12 @@ where )), e => e, }; - self.content.as_widget_mut().update( &mut tree.children[0], &c_event, - content, + content.with_virtual_offset( + translation + layout.virtual_offset(), + ), cursor, renderer, clipboard,