From 3cbc4ec0ae794aea40848d2fd3366fdd3916206d Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 9 Oct 2019 16:54:29 +0100 Subject: [PATCH] VST3: Fixed an issue in checkSizeConstraint() when the editor has a scale factor applied --- .../VST3/juce_VST3_Wrapper.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 1e3d2fb95c..d94d022a2d 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -1199,10 +1199,12 @@ private: { if (auto* constrainer = editor->getConstrainer()) { - auto minW = (double) constrainer->getMinimumWidth(); - auto maxW = (double) constrainer->getMaximumWidth(); - auto minH = (double) constrainer->getMinimumHeight(); - auto maxH = (double) constrainer->getMaximumHeight(); + auto scale = editor->getTransform().getScaleFactor(); + + auto minW = (double) (constrainer->getMinimumWidth() * scale); + auto maxW = (double) (constrainer->getMaximumWidth() * scale); + auto minH = (double) (constrainer->getMinimumHeight() * scale); + auto maxH = (double) (constrainer->getMaximumHeight() * scale); auto width = (double) (rectToCheck->right - rectToCheck->left); auto height = (double) (rectToCheck->bottom - rectToCheck->top);