From 8b3243b5a6958bc908837f81533f121620f4b702 Mon Sep 17 00:00:00 2001 From: akshayaurora Date: Tue, 22 Dec 2015 23:57:20 +0530 Subject: [PATCH] ButtonBehavior: use new property `min_state_time` in implementation and initialise it to `MIN_STATE_TIME` till it is removed. --- kivy/uix/behaviors/button.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kivy/uix/behaviors/button.py b/kivy/uix/behaviors/button.py index beec53f0f9..eec0c58625 100644 --- a/kivy/uix/behaviors/button.py +++ b/kivy/uix/behaviors/button.py @@ -53,7 +53,7 @@ class ButtonBehavior(object): :attr:`MIN_STATE_TIME` is a float and defaults to 0.035.''' - min_state_time = NumericProperty(0.035) + min_state_time = NumericProperty(MIN_STATE_TIME) '''The minimum period of time which the widget must remain in the `'down'` state. @@ -128,9 +128,9 @@ def on_touch_up(self, touch): return touchtime = time() - self.__touch_time - if touchtime < self.MIN_STATE_TIME: + if touchtime < self.min_state_time: self.__state_event = Clock.schedule_once( - self._do_release, self.MIN_STATE_TIME - touchtime) + self._do_release, self.min_state_time - touchtime) else: self._do_release() self.dispatch('on_release')