[vlc-devel] [vlc-commits] macosx: advanced prefs: only choose slider if we have limits set

Filip Roséen filip at atch.se
Fri Nov 4 19:43:43 CET 2016


Hi David,

I honestly do not know how to define a sensible range, nor how the
thoughts expressed in this email will play out from a user's
*point-of-view*.. so the thoughts raised are nothing more than
thoughts as the pop into my head while typing.

They thoughts might do more harm than good to be honest.. I am not
really a *GUI* guy. `;-)`

On 2016-11-02 18:54, David Fuhrmann wrote:

> Yes, this was the main reason, but I’m not sure what is the best
> way. Of course we can think about more sensibly defining „good
> limits“. I think a slider ranging from INT64_MIN to INT64_MAX - 1
> just does not make much sense.
> 
> After I looked at some ranges, It seems we define them quite
> diversely, ranging from small ranges, to something like
> [0,INT32_MAX].
> 
> On the other hand, the current code does not support values >
> sizeof(int) at all, as the controls store use int for the getters
> and setters.

Even though the control itself does not support values that are not in
the range `(INT_MIN, INT_MAX)`, the controls can still be used to
select a value as long as the absolute difference between *min* and
*max*  is less than the distance between `INT_MIN` and `INT_MAX`.

The above assumes that it is possible for the slider to have one
internal range, but the value displayed to the user being outside of
that range.

As an example, having a range from `(INT64_MAX-1024, INT64_MAX)` could
normalize the value, since `0` to `1024` can be represented in an
`int`, the slider internally uses the absolute range (in terms of
difference) but the users sees `INT64_MAX+x` (where `x` is the sliders
internal value).

> What is your opinion about that topic?

Even though it might not *"make sense"* to display a slider for a
range such as `(INT64_MIN+1, INT64_MAX)` (as this range is far too
large to yield any accurate precision) I think the easiest solution is
to simply display a slider as long as the range fit within the
requirements of the slider control.

It is very hard to come up what a *"sensible range"* corresponds to,
so the safest bet *could* be to just to display it as a slider, if it
can be displayed as a slider.

Another idea would be to have the slider work in steps larger than 1
for ranges that does not fit in the *slider-control* directly (given
that the user can explicitly adjust the value if the slider does not
yield accurate enough precision).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20161104/5ec0e0c1/attachment.html>


More information about the vlc-devel mailing list