I have a slider with a popup component, which displays its value (using slider.setPopupDisplayEnabled). Normally that works fine. But if I put the slider inside a Component and then scale down this component using an AffineTransform, it looks off.
In worst case the popup display does not update at all. But in some cases it can just look broken. Here is an example, where some digits are only shown partly:
I this case, the left half of the popup display gets updated, but the right half not.
The error only appears on OSX. Cant reproduce it on Windows 10.
Here is a short example code, to generate the error:
class ScaledSlider : public Component
{
public:
ScaledSlider()
{
slider.setTextBoxStyle(Slider::TextEntryBoxPosition::NoTextBox, true, 10, 10);
slider.setPopupDisplayEnabled(true, false, nullptr);
addAndMakeVisible(slider);
}
void resized()
{
slider.setBounds(50,50, 200, 50);
}
private:
Slider slider;
};
class MainComponent : public Component
{
public:
MainComponent()
{
addAndMakeVisible(scaledSlider);
}
void resized() override
{
scaledSlider.setTransform(AffineTransform::scale(0.55));
scaledSlider.setBounds(0,0, 300,300);
}
private:
ScaledSlider scaledSlider;
};
I am using JUCE 5.4.5 on OSX 10.14.6. The application is a standalone plugin.