1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-16 00:34:19 +00:00

Slider LinearBarVertical fixes.

This commit is contained in:
jules 2013-07-01 17:39:10 +01:00
parent 2329e63f20
commit 60fe89c1aa
2 changed files with 17 additions and 2 deletions

View file

@ -1466,7 +1466,13 @@ void LookAndFeel::drawLinearSlider (Graphics& g,
isMouseOver || slider.isMouseButtonDown()));
drawShinyButtonShape (g,
(float) x, (float) y, sliderPos - (float) x, (float) height, 0.0f,
(float) x,
style == Slider::LinearBarVertical ? sliderPos
: (float) y,
style == Slider::LinearBarVertical ? (float) width
: (sliderPos - x),
style == Slider::LinearBarVertical ? (height - sliderPos)
: (float) height, 0.0f,
baseColour,
slider.isEnabled() ? 0.9f : 0.3f,
true, true, true, true);

View file

@ -1146,7 +1146,7 @@ public:
const int indent = lf.getSliderThumbRadius (owner);
if (style == LinearBar || style == LinearBarVertical)
if (style == LinearBar)
{
const int barIndent = 1;
sliderRegionStart = barIndent;
@ -1155,6 +1155,15 @@ public:
sliderRect.setBounds (sliderRegionStart, barIndent,
sliderRegionSize, localBounds.getHeight() - barIndent * 2);
}
else if (style == LinearBarVertical)
{
const int barIndent = 1;
sliderRegionStart = barIndent;
sliderRegionSize = localBounds.getHeight() - barIndent * 2;
sliderRect.setBounds (barIndent, sliderRegionStart,
localBounds.getWidth() - barIndent * 2, sliderRegionSize);
}
else if (isHorizontal())
{
sliderRegionStart = sliderRect.getX() + indent;