mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-17 00:44:19 +00:00
VST3: Set the isStretchingTop/Left/Bottom/Right arguments of ComponentBoundsConstrainer::checkBounds() to fix some resizing issues when using a constrainer with a fixed aspect ratio
This commit is contained in:
parent
02f8a125c4
commit
ddddf0dbd4
1 changed files with 8 additions and 1 deletions
|
|
@ -944,7 +944,14 @@ private:
|
|||
if (auto* constrainer = editor->getConstrainer())
|
||||
{
|
||||
Rectangle<int> limits (0, 0, constrainer->getMaximumWidth(), constrainer->getMaximumHeight());
|
||||
constrainer->checkBounds (juceRect, editor->getBounds(), limits, false, false, false, false);
|
||||
|
||||
auto currentRect = editor->getBounds();
|
||||
|
||||
constrainer->checkBounds (juceRect, currentRect, limits,
|
||||
juceRect.getY() != currentRect.getY() && juceRect.getBottom() == currentRect.getBottom(),
|
||||
juceRect.getX() != currentRect.getX() && juceRect.getRight() == currentRect.getRight(),
|
||||
juceRect.getY() == currentRect.getY() && juceRect.getBottom() != currentRect.getBottom(),
|
||||
juceRect.getX() == currentRect.getX() && juceRect.getRight() != currentRect.getRight());
|
||||
|
||||
juceRect = component->getLocalArea (editor, juceRect);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue