diff options
author | 2025-02-01 01:04:36 +0100 | |
---|---|---|
committer | 2025-02-01 01:04:36 +0100 | |
commit | 7336a18443ea88ef04ea842a07ba02e89400bbd2 (patch) | |
tree | c8319002c9728f98ee5096598e4743f299822234 /widget | |
parent | 447f5ae494da7ef93ac073600f4e5a2559c4e71c (diff) | |
download | iced-7336a18443ea88ef04ea842a07ba02e89400bbd2.tar.gz iced-7336a18443ea88ef04ea842a07ba02e89400bbd2.tar.bz2 iced-7336a18443ea88ef04ea842a07ba02e89400bbd2.zip |
Fix `viewport` when using nested `scrollable`s
Diffstat (limited to 'widget')
-rw-r--r-- | widget/src/scrollable.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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 }, ); } |