-
Notifications
You must be signed in to change notification settings - Fork 785
Description
There is sometimes the need for having a TouchArea on top that doesn't block elements, or have a way to capture events even if there is a children TouchArea on top.
Original Bug Description
TouchArea pointer-event not called when moving mouse above children
I was trying to capture the mouse position within a TouchArea, but I noticed that the pointer-event callback isn't called when hovering a children within this TouchArea.
I was expecting the pointer event to be called since the out properties mouse-x and mouse-y are continuously updated.
Not all children causes this. Its the children that also have a TouchArea. so Button, CheckBox, LineEdit, etc. Rectangle and other component doesn't prevent the event to be called.
Quick example:
TouchArea {
pointer-event(event) => {
if event.kind == PointerEventKind.move {
// This is not called when hovering the button
debug(self.mouse-x, self.mouse-y);
}
}
Button {
text: "Example";
}
}Reproducible Code (if applicable)
More detailed Example on SlintPad
Environment Details
- Slint Version: 1.14.1
- Platform/OS: Windows 10
- Programming Language: Rust
- Backend/Renderer: Default
Product Impact
Building some little personal project I hope to finish and show off soon!
I can move ahead with the out properties, but this issue blocked me for a bit.