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

DemoRunner: Avoid applying insets to main component on desktop systems

This commit is contained in:
reuk 2024-01-17 22:49:26 +00:00
parent ddeae4a656
commit 3b3cd1bf1f
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

View file

@ -363,8 +363,10 @@ void MainComponent::resized()
{
auto bounds = getLocalBounds();
#if JUCE_IOS || JUCE_ANDROID
if (auto* display = Desktop::getInstance().getDisplays().getDisplayForRect (getScreenBounds()))
return display->safeAreaInsets.subtractedFrom (display->keyboardInsets.subtractedFrom (bounds));
#endif
return bounds;
}();