Re: [AD] d_slider_proc patches

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Sven Sandberg <ssven@xxxxxxxxxx> writes:
> Here is a patch that makes the d_slider_proc() only call its callback
> function if the slider position has changed.

Cool, thanks.

> btw, why is the following code in d_slider_proc() a loop:
[snip]
> So this loop just makes sure that the slider is moved at least one pixel,
> in case it takes more values than there are pixels. Why?

It's an aesthetic thing: it seems odd to me to have the value change when 
you press an arrow key, but no visible alternation on the screen to 
represent that. Plus sliders with very huge ranges are incredibly slow to 
move if arrow presses only translate into a tiny fraction of a pixel :-) And 
the more normal method of dragging with the mouse is by definition limited 
to pixel precision, so it doesn't seem unreasonable to me that keyboard 
input be the same: if you really need per-value control over the position, 
you need to make sure the slider has at least one pixel per value point, or 
the mouse won't be able to select all possible values.

I'm not especially hung up about that, though, and would be happy to change 
it if people agree that your change is worthwhile. Anyone else have strong 
(or even mild :-) opinions about this?


--
Shawn Hargreaves - shawn@xxxxxxxxxx - http://www.talula.demon.co.uk/
"A binary is barely software: it's more like hardware on a floppy disk."



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/