kivy/kivy — Issue #401: Scatter limits touch down detection of children to its bounding box
Author: bfritscher
Created: 2012-02-12 13:41:46+00:00
State: open

Hi,

I have a button in fact a (Label+Clickbehavior) which is a child of the scatter. This child is positioned to be 50% outside of the corner of the scatter widget. Therefore only the 50% of the surface of the child reacts to the touch (the part inside the scatter). In order to fix it, I had to override on_touch_down and change the order of the first two tests.

409 # if the touch isnt on the widget we do nothing
if not self.collide_point(x, y):
return False

should come after sending the touch event to the child

413 # let the child widgets handle the event if they want
touch.push()
touch.apply_transform_2d(self.to_local)
if super(Scatter, self).on_touch_down(touch):
touch.pop()
self._bring_to_front()
return True
touch.pop()

Or is limiting the touch for children to the inside of the scatter widget the expected behavior ?