mirror of https://github.com/python/cpython
improved scrollbar delay behavior -- jvr
This commit is contained in:
parent
7ceb5777d7
commit
eb67a7b980
|
@ -305,8 +305,11 @@ class Scrollbar(ControlWidget):
|
||||||
self._control.HiliteControl(part)
|
self._control.HiliteControl(part)
|
||||||
self._hit(part)
|
self._hit(part)
|
||||||
oldpart = part
|
oldpart = part
|
||||||
import time
|
# slight delay before scrolling at top speed...
|
||||||
time.sleep(0.3)
|
now = Evt.TickCount()
|
||||||
|
while Evt.StillDown():
|
||||||
|
if (Evt.TickCount() - now) > 18: # 0.3 seconds
|
||||||
|
break
|
||||||
while Evt.StillDown():
|
while Evt.StillDown():
|
||||||
part = self._control.TestControl(point)
|
part = self._control.TestControl(point)
|
||||||
if part == oldpart:
|
if part == oldpart:
|
||||||
|
|
Loading…
Reference in New Issue