summaryrefslogtreecommitdiffstats
path: root/native/src/widget/button.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-01-11 14:12:28 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-01-11 14:12:28 +0700
commit810e086728e938d1d12758c7b486c1e371127349 (patch)
treea598aab256c113bf7e21ba198d22a965ad554c03 /native/src/widget/button.rs
parent6ab4611a6eec9c4bb4ca1ff1bb580bb7edf49add (diff)
downloadiced-810e086728e938d1d12758c7b486c1e371127349.tar.gz
iced-810e086728e938d1d12758c7b486c1e371127349.tar.bz2
iced-810e086728e938d1d12758c7b486c1e371127349.zip
Introduce `Renderer` argument to `mouse_interaction` and `on_event`
Diffstat (limited to 'native/src/widget/button.rs')
-rw-r--r--native/src/widget/button.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/native/src/widget/button.rs b/native/src/widget/button.rs
index 686289e4..b4a3adc3 100644
--- a/native/src/widget/button.rs
+++ b/native/src/widget/button.rs
@@ -253,6 +253,7 @@ where
layout: Layout<'_>,
cursor_position: Point,
_viewport: &Rectangle,
+ _renderer: &Renderer,
) -> mouse::Interaction {
let is_mouse_over = layout.bounds().contains(cursor_position);
let is_disabled = self.on_press.is_none();
@@ -343,8 +344,10 @@ where
fn overlay(
&mut self,
layout: Layout<'_>,
+ renderer: &Renderer,
) -> Option<overlay::Element<'_, Message, Renderer>> {
- self.content.overlay(layout.children().next().unwrap())
+ self.content
+ .overlay(layout.children().next().unwrap(), renderer)
}
}