From 810e086728e938d1d12758c7b486c1e371127349 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 11 Jan 2022 14:12:28 +0700 Subject: Introduce `Renderer` argument to `mouse_interaction` and `on_event` --- native/src/widget/scrollable.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'native/src/widget/scrollable.rs') diff --git a/native/src/widget/scrollable.rs b/native/src/widget/scrollable.rs index 3ef737c0..4b005c6b 100644 --- a/native/src/widget/scrollable.rs +++ b/native/src/widget/scrollable.rs @@ -427,6 +427,7 @@ where layout: Layout<'_>, cursor_position: Point, _viewport: &Rectangle, + renderer: &Renderer, ) -> mouse::Interaction { let bounds = layout.bounds(); let content_layout = layout.children().next().unwrap(); @@ -457,6 +458,7 @@ where y: bounds.y + offset as f32, ..bounds }, + renderer, ) } } @@ -581,11 +583,12 @@ where fn overlay( &mut self, layout: Layout<'_>, + renderer: &Renderer, ) -> Option> { let Self { content, state, .. } = self; content - .overlay(layout.children().next().unwrap()) + .overlay(layout.children().next().unwrap(), renderer) .map(|overlay| { let bounds = layout.bounds(); let content_layout = layout.children().next().unwrap(); -- cgit