Hello,
It seems that the juce::CallOutBox
is sometimes shifted vertically to the bottom. In this example, the juce::CallOutBox
is not attached to a component and should display a rectangle with its origin at the mouse position. I tested on macOS and Windows with Juce 6.1.2 (master) and 96612b1 (develop).
I click at the bottom of the window and the position seems good:
I click at the top of the window and the position seems bad:
Code:
void MainComponent::mouseDown (juce::MouseEvent const& e)
{
class Rect
: public juce::Component
{
public:
Rect()
{
setSize(300, 200);
}
void paint (juce::Graphics& g) override
{
g.fillAll(juce::Colours::whitesmoke);
}
};
juce::CallOutBox::launchAsynchronously(std::make_unique<Rect>(), {e.getScreenX(), e.getScreenY(), 300, 200}, nullptr);
}