mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
DemoRunner: Avoid hiding UI behind virtual keyboard
This commit is contained in:
parent
8cab4cf5bb
commit
09c107698b
2 changed files with 8 additions and 1 deletions
|
|
@ -153,6 +153,13 @@ private:
|
||||||
|
|
||||||
void closeButtonPressed() override { JUCEApplication::getInstance()->systemRequestedQuit(); }
|
void closeButtonPressed() override { JUCEApplication::getInstance()->systemRequestedQuit(); }
|
||||||
|
|
||||||
|
#if JUCE_IOS || JUCE_ANDROID
|
||||||
|
void parentSizeChanged() override
|
||||||
|
{
|
||||||
|
getMainComponent().resized();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
MainComponent& getMainComponent() { return *dynamic_cast<MainComponent*> (getContentComponent()); }
|
MainComponent& getMainComponent() { return *dynamic_cast<MainComponent*> (getContentComponent()); }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -358,7 +358,7 @@ void MainComponent::resized()
|
||||||
auto bounds = getLocalBounds();
|
auto bounds = getLocalBounds();
|
||||||
|
|
||||||
if (auto* display = Desktop::getInstance().getDisplays().getDisplayForRect (getScreenBounds()))
|
if (auto* display = Desktop::getInstance().getDisplays().getDisplayForRect (getScreenBounds()))
|
||||||
return display->safeAreaInsets.subtractedFrom (bounds);
|
return display->safeAreaInsets.subtractedFrom (display->keyboardInsets.subtractedFrom (bounds));
|
||||||
|
|
||||||
return bounds;
|
return bounds;
|
||||||
}();
|
}();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue