Re: [Plib-devel] [RFC] changing slider behavior
Brought to you by:
sjbaker
From: Melchior F. <mf...@us...> - 2009-01-23 08:04:06
|
* John F. Fay -- Friday 23 January 2009: > But do, please, let me know if I made any mistakes in putting > in the changes. Thanks, everything fine so far. The commit log messages may be a bit misleading, as the committed patch did ultimately not "change" the slider behavior, but only add an alternative one, which is off by default. The next patches shall enable that for widgets that make use of them, though. > There were some compile warnings about type changes so I added > some explicit type casts. Sigh. I need to be more careful with that (and also find a compiler setting that warns me ... though I have -Wall on already). But you added more casts than make sense: + int upper = lower + int(float(box_len) * slider_fraction) ; The "float" is superfluous (and I'll remove that again). Did your compiler really suggest that? box_len is an int, but this is implicitly turned to a float by the compiler for the multiplication with float slider_fraction. Says the C++ standard. The int cast, however, is of course desirable -- be it only to make the intention clear. Not that it's actually required. Next planned patches: - fix a bug in puaLargeInput where increasing the widget width moved the text to the right (my fault) - let font changes also update the geometry (my fault) - simplify and optimize the slider autohiding code. That was a bit ugly in one of the last patches. Sorry. :-) - convert all widgets that use puSlider or puaScrollBar to the new slider behavior. ( Thanks for committing. m. |