The min, max, and steps work perfectly, but the skew factor seems to be ignored.
My custom Slider keeps a pointer to the parameter, so I’ve tried to get around this by going setSkewFactor((double) m_param->getNormalisableRange().skew) in the constructor, but that didn’t help. I’ve searched for help in the forum in similar topics, but those didn’t seem to help either, any advice would be appreciated!
Thanks for the reply! I know for sure that the parameter is getting added, as not only does everything else work, I can print the skew factor with DBG from the custom Slider class. I’ll try changing one of the sliders to a normal one and see if that works.
UPDATE: I’ve tried switching out a custom Slider for a normal one, and the skew factor does work as intended. My custom class inherits from Slider, but for some reason, this doesn’t seem to carry over.
Otherwise, I guess the reason why I created a custom class was to be able to reuse all its configurations, plus print labels not only for the current value, but also for also the min and max values of the full range. Ideally, if I can the skew right, then also for intermediate values as well, like a frequency knob in an SSL EQ for instance. I guess this may not be the best practice?
It’s possible that inheriting from Slider is the cleanest option in your case, I can’t tell.
I just mentioned that one can also create a custom control class not by inheriting from Slider but just having one as a member, and supplying a custom LookAndFeel class to it to change its appearance. Going this way gives a greater confidence that the core functionality of the Slider will work correctly.
Now that you have a working Slider, you can keep adding back the extra features one by one and seeing which one breaks the skew.
In case it may help someone else:
In the custom Slider’s paint function, I was calling drawRotarySlider(juce::Graphics &g, int x, int y, int width, int height, float sliderPosProportional, float rotaryStartAngle, float rotaryEndAngle, juce::Slider &slider) with a normalizing jmap at the float sliderPosProportional argument like so:
Thanks for helping with my issue! I had the same exact problem.
Just wanted to add that if you don’t have a pointer to your parameter, you can simply call this instead of jmap and set the skew with the APVTS