From 9ed7fb88663963c3b53eb109eebbc82ebfa479f3 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 14 Aug 2024 18:02:33 +0200 Subject: Fix cursor passthrough in `Stack` during `draw` --- examples/modal/src/main.rs | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'examples/modal/src/main.rs') diff --git a/examples/modal/src/main.rs b/examples/modal/src/main.rs index f1f0e8ad..067ca24d 100644 --- a/examples/modal/src/main.rs +++ b/examples/modal/src/main.rs @@ -201,19 +201,21 @@ where { stack![ base.into(), - mouse_area(center(opaque(content)).style(|_theme| { - container::Style { - background: Some( - Color { - a: 0.8, - ..Color::BLACK - } - .into(), - ), - ..container::Style::default() - } - })) - .on_press(on_blur) + opaque( + mouse_area(center(opaque(content)).style(|_theme| { + container::Style { + background: Some( + Color { + a: 0.8, + ..Color::BLACK + } + .into(), + ), + ..container::Style::default() + } + })) + .on_press(on_blur) + ) ] .into() } -- cgit