Need help with Vertical / horizontal slider

Hi all,
I need help with something for my vertical / horizontal sliders.
Currently, I have set lookandfeel and other characteristics of my sliders, and the thumbpoint starts correctly where I want it to be.
For example, I have one horizontal slider that starts at the center, but the problem I have is that the background path fill is already filled on one half at default, but I would llike it to only filll up when I move the slider left or right from the center.
Hope this isnt confusing, thanks in advance!

You want to create a look and feel class and override the relevant draw slider method. Then assign an instance of that class to the slider as its look and feel.

1 Like

Do you know specifically what part of affects or what code I should look into for what I need

This is how I did it, it’s for knobs, but it will serve as a reference

In the Lookandfeel drawRotarySlider function the arc starts at rotaryStartAngle and ends at the current angle, so I added in my override function that when it is symmetrical the arc is drawn from the mid angle between rotaryStarAngle and rotaryEndAngle

        if (slider.isSymmetricSkew())
            valueArc.addCentredArc(bounds.getCentreX(), bounds.getCentreY(), arcRadius, arcRadius, 0.0f, (rotaryStartAngle+rotaryEndAngle)/2, toAngle, true);
        else
            valueArc.addCentredArc(bounds.getCentreX(), bounds.getCentreY(), arcRadius, arcRadius, 0.0f, rotaryStartAngle, toAngle, true);

thanks I will give this a try and let you know how it worked!

In general, if you click through to the juce source code of the widget you are using, they will usually contain a struct of look and feel methods, so you can get an overview of what you can override there.