Permalink
Browse files

ButtonBehavior: use new property `min_state_time` in implementation a…

…nd initialise it to `MIN_STATE_TIME` till it is removed.
  • Loading branch information...
akshayaurora committed Dec 22, 2015
1 parent 2321507 commit 8b3243b5a6958bc908837f81533f121620f4b702
Showing with 3 additions and 3 deletions.
  1. +3 −3 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')

0 comments on commit 8b3243b

Please sign in to comment.