Better slider rounding

darcs
slava 2006-07-09 22:14:26 +00:00
parent f7871d7055
commit bdd295f086
2 changed files with 10 additions and 7 deletions

View File

@ -4,7 +4,6 @@
+ day after:
- roundoff is still not quite right with tracks
- httpd search tools
[2:45pm] tathi: Factor's text display is a bit odd sometimes, until you mouse over (or click, if there's no "live" text)
[2:48pm] tathi: it appears to be using the font metrics from the sprite tuple, but re-using the texture from the previous letter
@ -20,6 +19,8 @@
+ ui:
- integrated error documentation
- roundoff is still not quite right with tracks and sliders
- 'show' doesn't work if invoked from a listener on an object which is
itself inspected in the listener
- ui uses too much cpu time idling
@ -56,6 +57,7 @@
+ compiler/ffi:
- mach_signal: fault address reporting is not reliable
- mac intel: struct returns from objc methods
- see if alien calls can be made faster
- faster sequence= for UI

View File

@ -97,19 +97,20 @@ C: elevator ( vector -- elevator )
[ set-gadget-orientation ] keep ;
: (layout-thumb) ( slider n -- n thumb )
over gadget-orientation n*v [ >fixnum ] map
swap slider-thumb ;
over gadget-orientation n*v swap slider-thumb ;
: thumb-loc ( slider -- loc )
dup slider-value swap slider>screen ;
: layout-thumb-loc ( slider -- )
dup thumb-loc (layout-thumb) set-rect-loc ;
dup thumb-loc (layout-thumb)
>r [ floor ] map r> set-rect-loc ;
: layout-thumb-dim ( slider -- )
dup dup thumb-dim (layout-thumb)
>r >r dup rect-dim r> rot gadget-orientation set-axis r>
set-layout-dim ;
dup dup thumb-dim (layout-thumb) >r
>r dup rect-dim r>
rot gadget-orientation set-axis [ ceiling ] map
r> set-layout-dim ;
: layout-thumb ( slider -- )
dup layout-thumb-loc layout-thumb-dim ;