From ccc463a7c051b1096bc8a9f17ec64c2912a11247 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 13 Oct 2019 18:10:12 +0200 Subject: Draw checkbox in `iced_wgpu` --- native/src/widget/checkbox.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'native/src/widget/checkbox.rs') diff --git a/native/src/widget/checkbox.rs b/native/src/widget/checkbox.rs index cb2baedd..5393417e 100644 --- a/native/src/widget/checkbox.rs +++ b/native/src/widget/checkbox.rs @@ -26,9 +26,7 @@ where button: mouse::Button::Left, state: ButtonState::Pressed, }) => { - let mouse_over = layout - .children() - .any(|child| child.bounds().contains(cursor_position)); + let mouse_over = layout.bounds().contains(cursor_position); if mouse_over { messages.push((self.on_toggle)(!self.is_checked)); -- cgit