Browse Source

DemoRunner: Avoid applying insets to main component on desktop systems

v7.0.12
reuk 2 years ago
parent
commit
3b3cd1bf1f
No known key found for this signature in database GPG Key ID: FCB43929F012EE5C
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      examples/DemoRunner/Source/UI/MainComponent.cpp

+ 2
- 0
examples/DemoRunner/Source/UI/MainComponent.cpp View File

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


Loading…
Cancel
Save