diff --git a/kivy/uix/button.py b/kivy/uix/button.py index 1a527305e..ce4f217e6 100644 --- a/kivy/uix/button.py +++ b/kivy/uix/button.py @@ -67,7 +67,8 @@ class Button(Label): default to [1, 1, 1, 1]. ''' - background_normal = StringProperty('atlas://data/images/defaulttheme/button') + background_normal = StringProperty( + 'atlas://data/images/defaulttheme/button') '''Background image of the button used for default graphical representation, when the button is not pressed. @@ -77,7 +78,8 @@ class Button(Label): default to 'atlas://data/images/defaulttheme/button' ''' - background_down = StringProperty('atlas://data/images/defaulttheme/button_pressed') + background_down = StringProperty( + 'atlas://data/images/defaulttheme/button_pressed') '''Background image of the button used for default graphical representation, when the button is pressed. @@ -111,6 +113,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: @@ -122,9 +126,13 @@ class Button(Label): return True def on_touch_move(self, touch): + if super(Button, self).on_touch_move(touch): + return True return self in touch.ud def on_touch_up(self, touch): + if super(Button, self).on_touch_up(touch): + return True if touch.grab_current is not self: return assert(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