summaryrefslogtreecommitdiffstats
path: root/native/src/widget
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/widget')
-rw-r--r--native/src/widget/scrollable.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/native/src/widget/scrollable.rs b/native/src/widget/scrollable.rs
index 748fd27d..8958f6da 100644
--- a/native/src/widget/scrollable.rs
+++ b/native/src/widget/scrollable.rs
@@ -33,7 +33,7 @@ pub struct Scrollable<'a, Message, Renderer> {
scrollbar_margin: u16,
scroller_width: u16,
content: Column<'a, Message, Renderer>,
- on_scroll: Option<Box<dyn Fn(f32) -> Message>>,
+ on_scroll: Option<Box<dyn Fn(f32) -> Message + 'a>>,
style_sheet: Box<dyn StyleSheet + 'a>,
}
@@ -181,7 +181,7 @@ pub fn update<Message>(
scrollbar_width: u16,
scrollbar_margin: u16,
scroller_width: u16,
- on_scroll: &Option<Box<dyn Fn(f32) -> Message>>,
+ on_scroll: &Option<Box<dyn Fn(f32) -> Message + '_>>,
update_content: impl FnOnce(
Event,
Layout<'_>,
@@ -597,7 +597,7 @@ fn scrollbar(
fn notify_on_scroll<Message>(
state: &State,
- on_scroll: &Option<Box<dyn Fn(f32) -> Message>>,
+ on_scroll: &Option<Box<dyn Fn(f32) -> Message + '_>>,
bounds: Rectangle,
content_bounds: Rectangle,
shell: &mut Shell<'_, Message>,