Move left with cursor left and right with cursor right
authorStefan Vogel <sv@exept.de>
Wed, 25 Jul 2001 20:14:03 +0200
changeset 1983 ee3be6ecc37a
parent 1982 7e268ddd2ab2
child 1984 ccdfdf1c89af
Move left with cursor left and right with cursor right
Slider.st
--- a/Slider.st	Wed Jul 25 19:55:35 2001 +0200
+++ b/Slider.st	Wed Jul 25 20:14:03 2001 +0200
@@ -253,7 +253,7 @@
 !
 
 keyPress:key x:x y:y
-    <resource: #keyboard (#CursorRight #CursorUp #CursorLeft #CursorDown)>
+    <resource: #keyboard (#CursorRight #CursorUp #CursorLeft #CursorDown #+ #-)>
 
     |step|
 
@@ -261,17 +261,17 @@
 
     step := keyboardStep ? (rangeEnd - rangeStart / 10).
 
-    (key == #CursorRight
+    (key == #CursorLeft
     or:[key == #CursorUp
-    or:[key == $+]]) ifTrue:[
-        self scrollStep:step.
+    or:[key == $-]]) ifTrue:[
+        self scrollStep:step negated.
         ^ self
     ].
 
-    (key == #CursorLeft
+    (key == #CursorRight
     or:[key == #CursorDown
-    or:[key == $-]]) ifTrue:[
-        self scrollStep:step negated.
+    or:[key == $+]]) ifTrue:[
+        self scrollStep:step.
         ^ self
     ].
 
@@ -396,5 +396,5 @@
 !Slider class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/Slider.st,v 1.32 2001-05-17 11:12:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/Slider.st,v 1.33 2001-07-25 18:14:03 stefan Exp $'
 ! !