1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added a call to getToggleState() in ShapeButton::paintButton() to take into account toggle state when setting button colour

This commit is contained in:
ed 2016-12-07 12:07:58 +00:00
parent ffc687afdc
commit 38a47d4387

View file

@ -101,9 +101,9 @@ void ShapeButton::paintButton (Graphics& g, bool isMouseOverButton, bool isButto
const AffineTransform trans (shape.getTransformToScaleToFit (r, maintainShapeProportions));
g.setColour (isButtonDown ? downColour
: isMouseOverButton ? overColour
: normalColour);
g.setColour (isButtonDown || getToggleState() ? downColour
: isMouseOverButton ? overColour
: normalColour);
g.fillPath (shape, trans);
if (outlineWidth > 0.0f)