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

AudioPluginHost: Avoid drawing in unsafe areas of the screen on mobile

This commit is contained in:
reuk 2021-03-24 17:47:37 +00:00
parent 92ca22c080
commit 432cd793d7
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -1205,7 +1205,16 @@ GraphDocumentComponent::~GraphDocumentComponent()
void GraphDocumentComponent::resized()
{
auto r = getLocalBounds();
auto r = [this]
{
auto bounds = getLocalBounds();
if (auto* display = Desktop::getInstance().getDisplays().getDisplayForRect (getScreenBounds()))
return display->safeAreaInsets.subtractedFrom (bounds);
return bounds;
}();
const int titleBarHeight = 40;
const int keysHeight = 60;
const int statusHeight = 20;