Fix off-by-one slider bug
parent
0933402e5b
commit
e15fe7b092
|
@ -17,8 +17,7 @@
|
||||||
restores to an unresponsive gadget
|
restores to an unresponsive gadget
|
||||||
- fix top level window positioning
|
- fix top level window positioning
|
||||||
- services do not launch if factor not running
|
- services do not launch if factor not running
|
||||||
- when scrolling wheel, or moving mouse out of window, rollover is not
|
- rollover is not updated on focus changes
|
||||||
updated
|
|
||||||
- amd64 crash
|
- amd64 crash
|
||||||
- get factor running on mac intel
|
- get factor running on mac intel
|
||||||
- constant branch folding
|
- constant branch folding
|
||||||
|
@ -62,7 +61,6 @@
|
||||||
|
|
||||||
- x11 input methods
|
- x11 input methods
|
||||||
- roundoff is still not quite right with tracks
|
- roundoff is still not quite right with tracks
|
||||||
- clearing pane with ^L leaves scrollbar a pixel off
|
|
||||||
- new browser:
|
- new browser:
|
||||||
- browse generic words and classes
|
- browse generic words and classes
|
||||||
- need actions for reloading the source file and opening word in jEdit
|
- need actions for reloading the source file and opening word in jEdit
|
||||||
|
|
|
@ -25,14 +25,14 @@ TUPLE: slider elevator thumb value saved max page ;
|
||||||
dup slider-page over slider-max 1 max / 1 min
|
dup slider-page over slider-max 1 max / 1 min
|
||||||
swap elevator-length * min-thumb-dim max ;
|
swap elevator-length * min-thumb-dim max ;
|
||||||
|
|
||||||
: slider-max* dup slider-max swap slider-page - 1 max ;
|
: slider-max* dup slider-max swap slider-page - 0 max ;
|
||||||
|
|
||||||
: slider-scale ( slider -- n )
|
: slider-scale ( slider -- n )
|
||||||
#! A scaling factor such that if x is a slider co-ordinate,
|
#! A scaling factor such that if x is a slider co-ordinate,
|
||||||
#! x*n is the screen position of the thumb, and conversely
|
#! x*n is the screen position of the thumb, and conversely
|
||||||
#! for x/n. The '1 max' calls avoid division by zero.
|
#! for x/n. The '1 max' calls avoid division by zero.
|
||||||
dup elevator-length over thumb-dim - 1 max
|
dup elevator-length over thumb-dim - 1 max
|
||||||
swap slider-max* / ;
|
swap slider-max* 1 max / ;
|
||||||
|
|
||||||
: slider>screen slider-scale * ;
|
: slider>screen slider-scale * ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue