diff --git a/extras/AudioPluginHost/Source/UI/PluginWindow.h b/extras/AudioPluginHost/Source/UI/PluginWindow.h index c84518ac8c..80280639b1 100644 --- a/extras/AudioPluginHost/Source/UI/PluginWindow.h +++ b/extras/AudioPluginHost/Source/UI/PluginWindow.h @@ -176,11 +176,15 @@ public: } #if JUCE_IOS || JUCE_ANDROID - auto screenBounds = Desktop::getInstance().getDisplays().getTotalBounds (true).toFloat(); - auto scaleFactor = jmin ((screenBounds.getWidth() - 50) / getWidth(), (screenBounds.getHeight() - 50) / getHeight()); + const auto screenBounds = Desktop::getInstance().getDisplays().getTotalBounds (true).toFloat(); + const auto scaleFactor = jmin ((screenBounds.getWidth() - 50.0f) / (float) getWidth(), + (screenBounds.getHeight() - 50.0f) / (float) getHeight()); if (scaleFactor < 1.0f) - setSize ((int) (getWidth() * scaleFactor), (int) (getHeight() * scaleFactor)); + { + setSize ((int) (scaleFactor * (float) getWidth()), + (int) (scaleFactor * (float) getHeight())); + } setTopLeftPosition (20, 20); #else