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

VST3: Fixed incorrect high-DPI plug-in initial window size in Live on Windows

Live calls getSize() before the plug-in has been attached to the system window and can query the correct system scale factor, this size is then used to resize the plug-in after it has been attached resulting in an unscaled window size.
This commit is contained in:
ed 2021-02-10 15:49:53 +00:00
parent 5fc20f7106
commit 77f8e48730

View file

@ -1319,6 +1319,11 @@ private:
tresult PLUGIN_API getSize (ViewRect* size) override
{
#if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE
if (getHostType().isAbletonLive() && systemWindow == nullptr)
return kResultFalse;
#endif
if (size != nullptr && component != nullptr)
{
auto editorBounds = component->getSizeToContainChild();