From 732f239b54263652fd1a311936d50b5c9b4733ed Mon Sep 17 00:00:00 2001 From: Qua-non Date: Thu, 1 Mar 2012 01:58:57 +0530 Subject: [PATCH] propagate on_touch_down to kids in Button and Label --- kivy/uix/button.py | 2 ++ kivy/uix/label.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/kivy/uix/button.py b/kivy/uix/button.py index 1a527305e..cb782c748 100644 --- a/kivy/uix/button.py +++ b/kivy/uix/button.py @@ -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: diff --git a/kivy/uix/label.py b/kivy/uix/label.py index 2d3b9a937..c752dd7ae 100644 --- a/kivy/uix/label.py +++ b/kivy/uix/label.py @@ -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