summaryrefslogtreecommitdiffstats
path: root/native/src/widget/container.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-10-29 02:00:56 +0100
committerLibravatar GitHub <noreply@github.com>2020-10-29 02:00:56 +0100
commitb40775fb7414b44307e343921ef015c65a916dab (patch)
tree06a3fad05b14d3b0f97687bf410fa8bbc04c9526 /native/src/widget/container.rs
parent8a3ce90959e281cd73a7486d800df8d65478a698 (diff)
parent91b1886968b498b913984bdfa4bee840e8821ec6 (diff)
downloadiced-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 'native/src/widget/container.rs')
-rw-r--r--native/src/widget/container.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/native/src/widget/container.rs b/native/src/widget/container.rs
index b8316e62..5b04d699 100644
--- a/native/src/widget/container.rs
+++ b/native/src/widget/container.rs
@@ -191,11 +191,13 @@ where
defaults: &Renderer::Defaults,
layout: Layout<'_>,
cursor_position: Point,
+ viewport: &Rectangle,
) -> Renderer::Output {
renderer.draw(
defaults,
layout.bounds(),
cursor_position,
+ viewport,
&self.style,
&self.content,
layout.children().next().unwrap(),
@@ -242,6 +244,7 @@ pub trait Renderer: crate::Renderer {
defaults: &Self::Defaults,
bounds: Rectangle,
cursor_position: Point,
+ viewport: &Rectangle,
style: &Self::Style,
content: &Element<'_, Message, Self>,
content_layout: Layout<'_>,