Add Widget::propagates_pointer_interaction method.#1659
Add Widget::propagates_pointer_interaction method.#1659PoignardAzur merged 3 commits intolinebender:mainfrom
Widget::propagates_pointer_interaction method.#1659Conversation
This is a cleaner way to make Button and similar widgets have exclusively control of their pointer events, rather than making every widget that might be inside a button never accept them.
xStrom
left a comment
There was a problem hiding this comment.
Functionality makes sense.
I'm not too sure about the name though, it's not immediately clear at all what's the difference between accepts_pointer_interaction and contains_pointer_interactions. Also why is only one of them plural?
captures_ seems a bit better, but I guess it has a conflict with the existing pointer capture functionality.
terminates_ or concludes_ or even just ends_ make it more clear that the interaction will end but don't make it clear whether the widget itself will still get the event.
Perhaps the bool should be flipped and then it could be propagates_pointer_interaction. Because that's what it actually controls, right? Propagation of the pointer interaction to its children.
|
Yeah, I'm not too sure about the naming.
Good idea, thanks! |
be8799b to
c15719a
Compare
Widget::contains_pointer_interactions method.Widget::propagates_pointer_interaction method.
This is a cleaner way to make Button and similar widgets have exclusively control of their pointer events, rather than making every widget that might be inside a button never accept them.