From 7336a18443ea88ef04ea842a07ba02e89400bbd2 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 1 Feb 2025 01:04:36 +0100 Subject: Fix `viewport` when using nested `scrollable`s --- widget/src/scrollable.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'widget/src/scrollable.rs') diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs index 8ac70da8..966e4ac7 100644 --- a/widget/src/scrollable.rs +++ b/widget/src/scrollable.rs @@ -999,9 +999,9 @@ where content_layout, cursor, &Rectangle { - y: bounds.y + translation.y, - x: bounds.x + translation.x, - ..bounds + y: visible_bounds.y + translation.y, + x: visible_bounds.x + translation.x, + ..visible_bounds }, ); }, @@ -1103,9 +1103,9 @@ where content_layout, cursor, &Rectangle { - x: bounds.x + translation.x, - y: bounds.y + translation.y, - ..bounds + x: visible_bounds.x + translation.x, + y: visible_bounds.y + translation.y, + ..visible_bounds }, ); } -- cgit