mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AudioPluginHost: Fix implicit conversion warnings
This commit is contained in:
parent
dc8bc918d2
commit
7b61bdfba9
1 changed files with 7 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue