just added vertical to juce_LookAndFeel.cpp near line 1466 :
[code] if ( style == Slider::LinearBarVertical)
{
const bool isMouseOver = slider.isMouseOverOrDragging() && slider.isEnabled();
Colour baseColour (LookAndFeelHelpers::createBaseColour (slider.findColour (Slider::thumbColourId)
.withMultipliedSaturation (slider.isEnabled() ? 1.0f : 0.5f),
false, isMouseOver,
isMouseOver || slider.isMouseButtonDown()));
//KAMDERBAR FIND HOW TO CREATE A VERTICAL BAR WITH drawShinyButtonShape //
drawShinyButtonShape (g,
(float) x, sliderPos*((float)height/(float)width), (float) width, (float) height , 0.0f,
baseColour,
slider.isEnabled() ? 0.9f : 0.3f,
true, true, true, true);
}
else if ( style == Slider::LinearBar)
{
const bool isMouseOver = slider.isMouseOverOrDragging() && slider.isEnabled();
Colour baseColour (LookAndFeelHelpers::createBaseColour (slider.findColour (Slider::thumbColourId)
.withMultipliedSaturation (slider.isEnabled() ? 1.0f : 0.5f),
false, isMouseOver,
isMouseOver || slider.isMouseButtonDown()));
drawShinyButtonShape (g,
(float) x, (float) y, sliderPos - (float) x, (float) height, 0.0f,
baseColour,
slider.isEnabled() ? 0.9f : 0.3f,
true, true, true, true);
}[/code]
and in juce_Slider.cpp near line 1167 the value selection region size change to :
[code] if (style == LinearBar )
{
const int barIndent = 1;
sliderRegionStart = barIndent;
sliderRegionSize = localBounds.getWidth() - barIndent * 2;
sliderRect.setBounds (sliderRegionStart, barIndent,
sliderRegionSize, localBounds.getHeight() - barIndent * 2);
////KAMDERBAR REGION SIZE DEF SETTINGS SWITCH LINEARBAR TO VERTICAL////
}
else if (style == LinearBarVertical)
{
const int barIndent = 1;
sliderRegionStart = barIndent;
//////////////////////getWidth()///>>>TO>>>>>//getHeight()//////
sliderRegionSize = localBounds.getHeight() - barIndent * 2;
////////////////////////////////////////////////////////////////
sliderRect.setBounds (sliderRegionStart, barIndent,
sliderRegionSize, localBounds.getHeight() - barIndent * 2);
}
/////////****************/////////////////[/code]
and this in juce_Slider.cpp near line 1120 , optional , this is my setting , more easy to enter value , and double click default :
[code]//KAMDERBAR HAVE SET VALUE BOX TO BELOW THE BAR //
if ((style == LinearBarVertical) && (textBoxPos != NoTextBox))
{
valueBox->setBounds ((localBounds.getWidth() - tbw) / 2, localBounds.getHeight() - tbh, tbw, tbh);
sliderRect.setBounds (0, 0, localBounds.getWidth(), localBounds.getHeight() - tbh);
}
//******************************************************************************************//
else if (style == LinearBar)
{
if (valueBox != nullptr)
valueBox->setBounds (localBounds);
}[/code]
the bar works 100% , except if you resize the bar too big in width there is a limit… , but for a normal size bar no problem!
kamderbar.