Quick question about Slider


#1

I create a new Slider and set its style to IncDecButtons.
I set its range from 1 to 64, with 1 as interval.
Then I move the mouse wheel on it.
The current value of the slider jumps with increments of 2.
Is it possible to change somehow this increment value to 1?
So when I move the wheel it just changes the current value by 1?


#2

I’m surprised it doesn’t already do that - it probably just needs a bit of tweaking…


#3

So do you know what should I call in order to do it?
I don’t see anything useful… but I’m maybe missing something obvious.
I’ll step through the slider class code and look for mouse wheel related stuff.


#4

I see in Slider::mouseWheelMove you are using

const double proportionDelta = (wheelIncrementX != 0 ? -wheelIncrementX : wheelIncrementY) * 0.15f;

Could you add a parameter to specify the delta from outside, with related set/get functions?
That would be very useful!


#5

As if the slider class isn’t already too bloated!

That magic 0.15 number would have been chosen with no thought about how it’d work in an inc/dec slider, so it’s probably just better to tweak it to use a more appropriate number when in that mode.


#6

Ok, I’ll do that.
Thank you, as always!