Skip to content

Commit

Permalink
ButtonBehavior: use new property min_state_time in implementation a…
Browse files Browse the repository at this point in the history
…nd initialise it to `MIN_STATE_TIME` till it is removed.
  • Loading branch information
akshayaurora committed Dec 22, 2015
1 parent 2321507 commit 8b3243b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kivy/uix/behaviors/button.py
Expand Up @@ -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.
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 8b3243b

Please sign in to comment.