Hi.
My problem is somehow similar to another posted here: http://www.rawmaterialsoftware.com/viewtopic.php?f=2&t=4906&hilit=slider+clip
I Need to do custom slider which is supposed to look like this one:[attachment=0]whatiwanttoget.png[/attachment]
I’m trying to do that by nesting slider inside a component, because in normal slider entire horizontal space is taken as “work area”
That pointer is drawn using this code:
Path p;
p.addTriangle (1.f, 0.5f, triangleSide - 1, 0.5f, triangleSide / 2.f, triangleSide);
AffineTransform tr;
tr = tr.translated ( 0., cntrdY + 0);
p.applyTransform (tr);
g.setColour (Colours::white);
g.fillPath (p);
g.setColour (Colours::black);
g.strokePath (p, 1.f);
however when I change
side of the pointer is clipped on min and max position.
what else might be relevant…
class MySlider : public Slider
{
public:
MySlider() : Slider (LinearHorizontal, NoTextBox)
{
setRange (-1.f, 1.f);
}
~MySlider() {}
virtual void paint (Graphics& g)
{
//return;
g.fillAll (Colour (0x40000088));
}
};
my question is … should I do that by LookAndFeel somehow or my attempt is good but there is an issue I’m not aware.
I’ve tried to use stuff like toBack, setPaintingIsUnclipped etc, changing from paint to paintOverChildren but nothing worked as I expected.
Maybe there is just some way to limit slider’s “working area” ?
