mirror of https://github.com/kivy/kivy.git
propagate on_touch_down to kids in Button and Label
This commit is contained in:
parent
402ad02514
commit
732f239b54
|
@ -111,6 +111,8 @@ class Button(Label):
|
|||
self.state = 'normal'
|
||||
|
||||
def on_touch_down(self, touch):
|
||||
if super(Button, self).on_touch_down(touch):
|
||||
return True
|
||||
if not self.collide_point(touch.x, touch.y):
|
||||
return False
|
||||
if self in touch.ud:
|
||||
|
|
|
@ -179,6 +179,8 @@ class Label(Widget):
|
|||
self.texture_size = list(self.texture.size)
|
||||
|
||||
def on_touch_down(self, touch):
|
||||
if super(Label, self).on_touch_down(touch):
|
||||
return True
|
||||
if not len(self.refs):
|
||||
return False
|
||||
tx, ty = touch.pos
|
||||
|
|
Loading…
Reference in New Issue