I’m trying to customize a Slider in order not to make it “jump” to a new value when I click the mouse on it.
I’d like just to start a relative move whatever is the location where I started dragging the slider cursor.
I think it would be useful to developers if it were possible to fine-tune those parameters that are now hard-coded, i.e. provide get and set methods for the following parameters:
double velocityBasedModeSensitivity; // defaults to the value of 0.2 currently multipling the whole formula 0.2
double velocityBasedModeThreshold; // defaults to the value of 0.1 currently subtracted from "speed"
double velocityBasedModeOffset; // defaults to 0.0 and it's a value to be added to the starting 1.5 for trimming the starting slope
(names are of your choice, obviously, if you decide to implement them. These are only for explaining what I guess their meaning is)
Not sure about the offset though - surely changing that value would make it move at different speeds depending on the direction, and could even go backwards - do you actually need that ability?
the offset parameters should serve as a mean for setting the starting velocity, or a lower bound for slider’s speed: mathematically speaking, supposing the “speed” variablle having the 0 value (or very small ones) before formula evaluation, gives a calculated speed very close to 0, since
1.0 + sin(Pi*1.5) = 0
If we had an initial offset of, say, 0.01, this would increase the minimum speed we’d have for ideal 0 speed: evaluating the formula would give
1.0 + sin(Pi*1.51) > 0
This is a “limit” calculation: of course, we don’t really want the slider to move if the mouse didn’t move (i.e. speed = 0 before calculating the formula), but this should already be true given the fact this happens in a function that’s called only when the mouse actually moves.
I agree with you that offset value shouldn’t be allowed to be set negative, this would have no useful effects on the interface.
I’m sorry if the explaination isn’t so clear, it’d require a small drawing of the first period of a sine function to be properly shown…