summaryrefslogtreecommitdiffstats
path: root/native/src/widget/button.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2022-01-13 15:42:40 +0700
committerLibravatar GitHub <noreply@github.com>2022-01-13 15:42:40 +0700
commit15a13a76b4b0534d08afc0328b90267048e41b9d (patch)
treedd5fa045c9fd3f8f116f230c3e70dcba2d32d011 /native/src/widget/button.rs
parent1a31aefab401712e44cd613fc1337ab90579d926 (diff)
parentf6c436aec1acb674078bf7e878b9e49f28e947a7 (diff)
downloadiced-15a13a76b4b0534d08afc0328b90267048e41b9d.tar.gz
iced-15a13a76b4b0534d08afc0328b90267048e41b9d.tar.bz2
iced-15a13a76b4b0534d08afc0328b90267048e41b9d.zip
Merge pull request #1193 from iced-rs/responsive-widget
`Responsive` widget
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)
}
}