summaryrefslogtreecommitdiffstats
path: root/examples/toast/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/toast/src/main.rs')
-rw-r--r--examples/toast/src/main.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/toast/src/main.rs b/examples/toast/src/main.rs
index 4282ddcf..5d29e895 100644
--- a/examples/toast/src/main.rs
+++ b/examples/toast/src/main.rs
@@ -400,6 +400,7 @@ mod toast {
renderer: &Renderer,
clipboard: &mut dyn Clipboard,
shell: &mut Shell<'_, Message>,
+ viewport: &Rectangle,
) -> event::Status {
self.content.as_widget_mut().on_event(
&mut state.children[0],
@@ -409,6 +410,7 @@ mod toast {
renderer,
clipboard,
shell,
+ viewport,
)
}
@@ -559,6 +561,8 @@ mod toast {
}
}
+ let viewport = layout.bounds();
+
self.toasts
.iter_mut()
.zip(self.state.iter_mut())
@@ -576,6 +580,7 @@ mod toast {
renderer,
clipboard,
&mut local_shell,
+ &viewport,
);
if !local_shell.is_empty() {