mirror of https://github.com/kivy/kivy.git
uix:TextInput improve responsiveness of cut/copy paste bubble.
reduce long touch time and animation durationfor bubble
This commit is contained in:
parent
0fe1430519
commit
6566d0c047
|
@ -740,7 +740,7 @@ class TextInput(Widget):
|
||||||
self._hide_cut_copy_paste(self._win)
|
self._hide_cut_copy_paste(self._win)
|
||||||
# schedule long touch for paste
|
# schedule long touch for paste
|
||||||
self._long_touch_pos = touch.pos
|
self._long_touch_pos = touch.pos
|
||||||
Clock.schedule_once(self.long_touch, 1)
|
Clock.schedule_once(self.long_touch, .5)
|
||||||
|
|
||||||
self.cursor = self.get_cursor_from_xy(*touch_pos)
|
self.cursor = self.get_cursor_from_xy(*touch_pos)
|
||||||
if not self._selection_touch:
|
if not self._selection_touch:
|
||||||
|
@ -795,7 +795,7 @@ class TextInput(Widget):
|
||||||
return
|
return
|
||||||
bubble = self._bubble
|
bubble = self._bubble
|
||||||
if bubble is not None:
|
if bubble is not None:
|
||||||
anim = Animation(opacity=0, d=.333)
|
anim = Animation(opacity=0, d=.225)
|
||||||
anim.bind(on_complete=lambda *args: win.remove_widget(bubble))
|
anim.bind(on_complete=lambda *args: win.remove_widget(bubble))
|
||||||
anim.start(bubble)
|
anim.start(bubble)
|
||||||
|
|
||||||
|
@ -855,7 +855,7 @@ class TextInput(Widget):
|
||||||
Animation.cancel_all(bubble)
|
Animation.cancel_all(bubble)
|
||||||
bubble.opacity = 0
|
bubble.opacity = 0
|
||||||
win.add_widget(bubble)
|
win.add_widget(bubble)
|
||||||
Animation(opacity=1, d=.333).start(bubble)
|
Animation(opacity=1, d=.225).start(bubble)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Private
|
# Private
|
||||||
|
|
Loading…
Reference in New Issue