Fix cursor passthrough in Stack during draw

This commit is contained in:
Héctor Ramón Jiménez 2024-08-14 18:02:33 +02:00
parent 8b45d620d0
commit 9ed7fb8866
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 67 additions and 30 deletions

View file

@ -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()
}