From a50cc32d09ddff1d061701074908c28d5c5509ba Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 30 Jan 2023 05:01:28 +0100 Subject: Fix layout translation in `overlay::Group` This bug produced improper positioning of overlays of elements inside a `Scrollable`. --- lazy/src/component.rs | 4 ++-- lazy/src/lazy.rs | 4 ++-- lazy/src/responsive.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lazy/src') diff --git a/lazy/src/component.rs b/lazy/src/component.rs index d3c52df5..94263274 100644 --- a/lazy/src/component.rs +++ b/lazy/src/component.rs @@ -455,9 +455,9 @@ where position: Point, ) -> layout::Node { self.with_overlay_maybe(|overlay| { - let vector = position - overlay.position(); + let translation = position - overlay.position(); - overlay.layout(renderer, bounds).translate(vector) + overlay.layout(renderer, bounds, translation) }) .unwrap_or_default() } diff --git a/lazy/src/lazy.rs b/lazy/src/lazy.rs index 933def96..9795afa4 100644 --- a/lazy/src/lazy.rs +++ b/lazy/src/lazy.rs @@ -313,9 +313,9 @@ where position: Point, ) -> layout::Node { self.with_overlay_maybe(|overlay| { - let vector = position - overlay.position(); + let translation = position - overlay.position(); - overlay.layout(renderer, bounds).translate(vector) + overlay.layout(renderer, bounds, translation) }) .unwrap_or_default() } diff --git a/lazy/src/responsive.rs b/lazy/src/responsive.rs index 52badda2..e399e7b0 100644 --- a/lazy/src/responsive.rs +++ b/lazy/src/responsive.rs @@ -356,9 +356,9 @@ where position: Point, ) -> layout::Node { self.with_overlay_maybe(|overlay| { - let vector = position - overlay.position(); + let translation = position - overlay.position(); - overlay.layout(renderer, bounds).translate(vector) + overlay.layout(renderer, bounds, translation) }) .unwrap_or_default() } -- cgit