]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
improved scrollbar delay behavior -- jvr
authorJust van Rossum <just@lettererror.com>
Wed, 21 Apr 1999 09:24:02 +0000 (09:24 +0000)
committerJust van Rossum <just@lettererror.com>
Wed, 21 Apr 1999 09:24:02 +0000 (09:24 +0000)
Mac/Tools/IDE/Wcontrols.py

index c5511d4b60155ca3d34373f8ce78b3a771b67c18..7add904ff21f639233627fcca0e38673c42740d0 100644 (file)
@@ -305,8 +305,11 @@ class Scrollbar(ControlWidget):
                        self._control.HiliteControl(part)
                        self._hit(part)
                        oldpart = part
-                       import time
-                       time.sleep(0.3)
+                       # slight delay before scrolling at top speed...
+                       now = Evt.TickCount()
+                       while Evt.StillDown():
+                               if (Evt.TickCount() - now) > 18: # 0.3 seconds
+                                       break
                        while Evt.StillDown():
                                part = self._control.TestControl(point)
                                if part == oldpart: