diff options
author | 2020-10-29 02:00:56 +0100 | |
---|---|---|
committer | 2020-10-29 02:00:56 +0100 | |
commit | b40775fb7414b44307e343921ef015c65a916dab (patch) | |
tree | 06a3fad05b14d3b0f97687bf410fa8bbc04c9526 /graphics/src/widget/container.rs | |
parent | 8a3ce90959e281cd73a7486d800df8d65478a698 (diff) | |
parent | 91b1886968b498b913984bdfa4bee840e8821ec6 (diff) | |
download | iced-b40775fb7414b44307e343921ef015c65a916dab.tar.gz iced-b40775fb7414b44307e343921ef015c65a916dab.tar.bz2 iced-b40775fb7414b44307e343921ef015c65a916dab.zip |
Merge pull request #584 from hecrj/improvement/viewport-aware-drawing
Viewport aware drawing
Diffstat (limited to 'graphics/src/widget/container.rs')
-rw-r--r-- | graphics/src/widget/container.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/graphics/src/widget/container.rs b/graphics/src/widget/container.rs index 5b3a01d2..4854f589 100644 --- a/graphics/src/widget/container.rs +++ b/graphics/src/widget/container.rs @@ -24,6 +24,7 @@ where defaults: &Defaults, bounds: Rectangle, cursor_position: Point, + viewport: &Rectangle, style_sheet: &Self::Style, content: &Element<'_, Message, Self>, content_layout: Layout<'_>, @@ -36,8 +37,13 @@ where }, }; - let (content, mouse_interaction) = - content.draw(self, &defaults, content_layout, cursor_position); + let (content, mouse_interaction) = content.draw( + self, + &defaults, + content_layout, + cursor_position, + viewport, + ); if let Some(background) = background(bounds, &style) { ( |