Browse Source

VST3: Fixed an issue in checkSizeConstraint() when the editor has a scale factor applied

tags/2021-05-28
ed 6 years ago
parent
commit
3cbc4ec0ae
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp

+ 6
- 4
modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp View File

@@ -1199,10 +1199,12 @@ private:
{ {
if (auto* constrainer = editor->getConstrainer()) 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 width = (double) (rectToCheck->right - rectToCheck->left);
auto height = (double) (rectToCheck->bottom - rectToCheck->top); auto height = (double) (rectToCheck->bottom - rectToCheck->top);


Loading…
Cancel
Save