# VST3 plugin editor resizing glitch/issues

**URL:** <https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170>\
**Category:** Windows\
**Created:** [February 1, 2021, 10:35am UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170 "2021-02-01T10:35:20Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![ed95](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ed95/32/7635_2.png) [@ed95](https://forum.juce.com/u/ed95)\
**Post date:** [February 26, 2021, 2:19pm UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/21 "2021-02-26T14:19:03Z")

</div>

Can you try the latest `develop`? The resizing moving editor bug should be fixed there.

---

<div class="post-metadata">

**Author:** ![hgroenenboom](https://avatars.discourse-cdn.com/v4/letter/h/7ba0ec/32.png) [@hgroenenboom](https://forum.juce.com/u/hgroenenboom)\
**Post date:** [February 26, 2021, 2:40pm UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/22 "2021-02-26T14:40:36Z")

</div>

I was already using the latest commit on develop for these gifs. (this one to confirm [VST3: Fixed an issue with jumpy resizing when using a fixed aspect r… · juce-framework/JUCE@e813531 · GitHub](https://github.com/juce-framework/JUCE/commit/e813531d9bf0e2a7768224fb8277b85b746b94c9))

---

<div class="post-metadata">

**Author:** ![D1rtyMusic](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/d1rtymusic/32/10801_2.png) [@D1rtyMusic](https://forum.juce.com/u/D1rtyMusic)\
**Post date:** [February 26, 2021, 4:43pm UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/23 "2021-02-26T16:43:19Z")

</div>

I have a similar problem on OSX and Ableton, as seen in the gif. With Max and DemoRunner it works as expected. The AU version worked fine in all Hosts including Ableton.  
I used the updated Wrapperfile, but it makes no difference for me.  
 ![Glitch](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/0/0b2978586c1b376aee9022028e24884fb21c67c8.gif)

---

<div class="post-metadata">

**Author:** ![D1rtyMusic](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/d1rtymusic/32/10801_2.png) [@D1rtyMusic](https://forum.juce.com/u/D1rtyMusic)\
**Post date:** [February 26, 2021, 8:53pm UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/24 "2021-02-26T20:53:46Z")

</div>

So for everybody who has to deal with this glitch thing I may have a workaround for you.  
I made a small slider which I placed in the bottomrightcorner. I recommend to use RotaryHorizontalDrag for Sliderstyle. Now I rotated it by 0,75. Draging the slider will change the GUIsize, and the rest of your Resizable components. Just the resize-slider itself will not be replaced and resized until you stopped dragging.

```
#include "PluginProcessor.h"
#include "PluginEditor.h"

//==============================================================================
NewProjectAudioProcessorEditor::NewProjectAudioProcessorEditor (NewProjectAudioProcessor& p)
    : AudioProcessorEditor (&p), audioProcessor (p)
{
    setResizable(false, false);
    setSize(300, 300);
    
    addAndMakeVisible(ReSize);
    ReSize.setTextBoxStyle(juce::Slider::NoTextBox, true, 0, 0);
    ReSize.setSliderStyle (juce::Slider::RotaryHorizontalDrag);
    ReSize.setRange(1.f, 2.f, 0);
    ReSize.addListener(this);
    ReSize.setBounds(260, 260, 50, 50);
    
}

NewProjectAudioProcessorEditor::~NewProjectAudioProcessorEditor()
{
}

//==============================================================================
void NewProjectAudioProcessorEditor::paint (juce::Graphics& g)
{
    // (Our component is opaque, so we must completely fill the background with a solid colour)
    g.fillAll (getLookAndFeel().findColour (juce::ResizableWindow::backgroundColourId));
}

void NewProjectAudioProcessorEditor::resized()
{
}

void NewProjectAudioProcessorEditor::sliderValueChanged (juce::Slider* sliderThatWasMoved){
    if (sliderThatWasMoved == &ReSize){
        x = ReSize.getValue();
        setSize(300*x, 300*x);
    }
}

void NewProjectAudioProcessorEditor::sliderDragEnded(juce::Slider* sliderThatWasMoved){
    if (sliderThatWasMoved == &ReSize){
        y = x;
        ReSize.setBounds(260*y, 260*y, 50*y, 50*y);
        ReSize.setTransform(juce::AffineTransform::rotation(0.75, ReSize.getWidth()/2 +ReSize.getX(), ReSize.getHeight()/2 +ReSize.getY()));
    }
}

```

You may now make the slider transparent and place a picture of that well known Resize-triangle underneath it.

---

<div class="post-metadata">

**Author:** ![ed95](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ed95/32/7635_2.png) [@ed95](https://forum.juce.com/u/ed95)\
**Post date:** [February 27, 2021, 10:11am UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/25 "2021-02-27T10:11:35Z")

</div>

I can’t reproduce this using the latest `develop` in either Live 10 or 11, I’ve created a blank plug-in from the Projucer and added the following to its constructor:

```auto
setResizable (true, true);
setResizeLimits (600, 400, 1200, 800);
getConstrainer()->setFixedAspectRatio (1.5);

setSize (600, 400);

```

The plug-in is resizable using the bottom-right resizer and there are no artefacts like in your gif. Can you post a minimal example which reproduces the issue?

---

<div class="post-metadata">

**Author:** ![D1rtyMusic](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/d1rtymusic/32/10801_2.png) [@D1rtyMusic](https://forum.juce.com/u/D1rtyMusic)\
**Post date:** [February 27, 2021, 11:09am UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/26 "2021-02-27T11:09:14Z")

</div>

I solved the problem using the code I posted above. However I did not have the line “getConstrainer()-\>setFixedAspectRatio (1.5);” in it.

I just made a quick testproject including that line and it worked fine.

---

<div class="post-metadata">

**Author:** ![ed95](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ed95/32/7635_2.png) [@ed95](https://forum.juce.com/u/ed95)\
**Post date:** [February 27, 2021, 1:31pm UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/27 "2021-02-27T13:31:19Z")

</div>

And without it? I’m still not able to reproduce the glitches you’re seeing with orr without that line. A minimal example would be very helpful in tracking this down.

---

<div class="post-metadata">

**Author:** ![D1rtyMusic](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/d1rtymusic/32/10801_2.png) [@D1rtyMusic](https://forum.juce.com/u/D1rtyMusic)\
**Post date:** [February 27, 2021, 1:59pm UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/28 "2021-02-27T13:59:38Z")

</div>

So this is the code if that line is there it works, with that line it produces the glitch. The difference to your example is that I used a resized picture background and that the ratio between width and height is always the same.

```
#include "PluginProcessor.h"
#include "PluginEditor.h"

//==============================================================================
NewProjectAudioProcessorEditor::NewProjectAudioProcessorEditor (NewProjectAudioProcessor& p)
    : AudioProcessorEditor (&p), audioProcessor (p)
{
    //setSize (400, 300);
    setResizable (true, true);
    setResizeLimits (600, 400, 1200, 800);
    //getConstrainer()->setFixedAspectRatio (1.5);

    setSize (600, 400);
    
    drawable1 = juce::Drawable::createFromImageData (BinaryData::Hintergrund_png, BinaryData::Hintergrund_pngSize);
}

NewProjectAudioProcessorEditor::~NewProjectAudioProcessorEditor()
{
    drawable1 = nullptr;
}

//==============================================================================
void NewProjectAudioProcessorEditor::paint (juce::Graphics& g)
{
    {
            jassert (drawable1 != nullptr);
            if (drawable1 != nullptr)
                drawable1->drawWithin (g, juce::Rectangle<int> (0, 0, getWidth(), getHeight()).toFloat(),
                                       juce::RectanglePlacement::stretchToFit, 0.997f);
        }
}

void NewProjectAudioProcessorEditor::resized()
{
    setSize(getHeight()*1.5, getHeight());
}

```

Here’s a link to the project [Dropbox - NewProject.zip - Simplify your life](https://www.dropbox.com/s/c0wusdz0rnke3n5/NewProject.zip?dl=0)

---

<div class="post-metadata">

**Author:** ![ed95](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ed95/32/7635_2.png) [@ed95](https://forum.juce.com/u/ed95)\
**Post date:** [February 27, 2021, 3:49pm UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/29 "2021-02-27T15:49:25Z")

</div>

> [@D1rtyMusic](#):
>
> ```auto
> void NewProjectAudioProcessorEditor::resized()
> {
> setSize(getHeight()*1.5, getHeight());
> }
> 
> ```

This is definitely a bad idea. Calling `setSize()` in your `resized()` callback is just asking for trouble with recursive resizing loops. If you want to enforce a specific aspect ratio that’s what `ComponentBoundsConstrainer::setFixedAspectRatio()` is for as it will actually be handled at the plug-in wrapper level.

---

<div class="post-metadata">

**Author:** ![D1rtyMusic](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/d1rtymusic/32/10801_2.png) [@D1rtyMusic](https://forum.juce.com/u/D1rtyMusic)\
**Post date:** [February 28, 2021, 6:29pm UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/30 "2021-02-28T18:29:16Z")

</div>

Oh ok good to know. So I’ll try that next time.

---

<div class="post-metadata">

**Author:** ![haroldgroenenboom](https://avatars.discourse-cdn.com/v4/letter/h/8c91f0/32.png) [@haroldgroenenboom](https://forum.juce.com/u/haroldgroenenboom)\
**Post date:** [March 1, 2021, 10:22am UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/31 "2021-03-01T10:22:46Z")

</div>

Hey Ed, I can reproduce the exact same issues with the same code I’m afraid. I’ve doublechecked that I’m using the same develop commit and cleaned the project and what so ever. I’d love to help more on this issue since this is still blocking me, so please let me know if there anything I can do

```auto
    setResizable(true, true);
    setResizeLimits(400, 300, 800, 500);
    getConstrainer()->setFixedAspectRatio(1.5);

    setSize (400, 300);

```

What do you think of the proposition of making `setResizable(false,true)` work:

- Use the JUCE resizable corner, which works great
- Disables the host resizing window (by indirectly returning false via the VST3 sdks `canResize()`)

This would still be the best fix for me, since I actually for other reasons don’t want the plugin to be resizable from all corners. If I’m right currently the only way to disable the resizing done by the host is by calling `setResizable(false, <true/false>)` in the plugineditor

---

<div class="post-metadata">

**Author:** ![Toddler-Boy](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/toddler-boy/32/2007_2.png) [@Toddler-Boy](https://forum.juce.com/u/Toddler-Boy)\
**Post date:** [March 1, 2021, 10:17pm UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/32 "2021-03-01T22:17:26Z")

</div>

These values don’t make sense. 400:300 = 1.33333 not 1.5  
800:500 = 1.6

You are telling JUCE to use a fixed aspect ratio of 1.5 and then use 1.333333 as you minimum and 1.6 as your maximum.

```auto
setResizeLimits(400, 266, 800, 533);
getConstrainer()->setFixedAspectRatio(1.5);
setSize (400, 266);

```

Looks more sane. Maybe that’s the whole issue?

---

<div class="post-metadata">

**Author:** ![haroldgroenenboom](https://avatars.discourse-cdn.com/v4/letter/h/8c91f0/32.png) [@haroldgroenenboom](https://forum.juce.com/u/haroldgroenenboom)\
**Post date:** [March 2, 2021, 9:16am UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/33 "2021-03-02T09:16:37Z")

</div>

Fair point! I just used some arbitrary values here to be fair, since these issues are also happening with my product code with a valid aspect ratio. But I’ve just tested it in an empty product with a valid aspect ratio as well and I can still reproduce the issues in both ableton and fl studio on Windows

```auto
    setResizable(true, true);
    setResizeLimits(400, 300, 800, 600);
    getConstrainer()->setFixedAspectRatio(1.3333f);

    // Make sure that before the constructor has finished, you've set the
    // editor's size to whatever you need it to be.
    setSize (400, 300);

```

---

<div class="post-metadata">

**Author:** ![harold](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@harold](https://forum.juce.com/u/harold)\
**Post date:** [March 5, 2021, 9:19am UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/34 "2021-03-05T09:19:37Z")

</div>

Hey Ed, sorry to keep bugging you with this, but we are still experiencing this issue  
and it’s a major blocker.

What do you think of the proposal to enable the `setResizable(false,true)` option.  
Here’s a diff to get the idea for what I’m suggesting. I’ve tested this and this works so far:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/5/549d054c817f1a18ff75b9d9599b53f2d137c685.png)

Is anyone else here able to still reproduce this? Would be helpfull to get a confirmation from someone else for Ed as well I think.

---

<div class="post-metadata">

**Author:** ![ed95](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ed95/32/7635_2.png) [@ed95](https://forum.juce.com/u/ed95)\
**Post date:** [March 6, 2021, 12:00pm UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/35 "2021-03-06T12:00:39Z")

</div>

I was able to reproduce the issue you described and I’m not sure there’s anything we can do in the resizing code to fix it. It seems to be just a quirk of some DAWs that if they try to resize the VST3 editor to a size that it doesn’t support it results in the window moving whilst staying the same size.

Modifying the behaviour of `AudioProcessorEditor::setResizable()` to allow host resizing and user resizing via the bottom-right corner resizer have different values is probably the way to go here and I think that was always the intention of that method since the first parameter name is `allowHostToResize`. The documentation in that class with regards to resizing/constrainers isn’t particularly clear so it’s easy to see why it might be confusing. We’ve added this change and updated the docs to be clearer on `develop` in [5a59c92](https://github.com/juce-framework/JUCE/commit/5a59c92b200c1c42c5e2f34186e1567c57d22d2f) - please let us know if this fixes the issue for you.

---

<div class="post-metadata">

**Author:** ![harold](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@harold](https://forum.juce.com/u/harold)\
**Post date:** [March 11, 2021, 9:35am UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/36 "2021-03-11T09:35:32Z")

</div>

Awesome, thanks for this fix! I always asumed this was the intent of the method as well. We will test this out shortly!

---

<div class="post-metadata">

**Author:** ![mboerum](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@mboerum](https://forum.juce.com/u/mboerum)\
**Post date:** [March 23, 2021, 8:15pm UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/37 "2021-03-23T20:15:04Z")

</div>

Still no dice on the AAX resizing issue. Any word on that fix?

---

<div class="post-metadata">

**Author:** ![jcomusic](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jcomusic/32/2014_2.png) [@jcomusic](https://forum.juce.com/u/jcomusic)\
**Post date:** [April 30, 2021, 2:31pm UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/38 "2021-04-30T14:31:18Z")

</div>

Thanks! It kinda works when calling setResizable(false, true) _after_ setResizeLimits, because otherwise setResizeLimits will magically reenable “resizableByHost”.

If I use setResizable(true, true), I’m getting a pluginwindow that magically increases in size every time I open the plugin using a display scale factor of 125% and “per monitor aware”, so that’s not an option I guess…

Somewhat related to this, there are still semi random issues when dragging the plugin window (vst3) between screens with different scale factors in a compatible host (e.g. reaper and cubase). sometimes the window boundaries don’t get updated properly and you can end up with a “cropped” view, or additional blank space.

I tried to disable “per monitor dpi awareness” in the gui basics module settings (with the idea being, once resizing works properly, to leave size completely to the user).  
Sadly, there is a very foundational bug that can prevent text editors from working.

Here is what I observed:

when disabling “per monitor dpi aware” on windows, labels can’t be edited properly, because the repaint invalidation area is calculated incorrectly.  
see juce\_Component.cpp, internalRepaintUnchecked, auto peerBounds = peer-\>getBounds();  
this usually returns the correct (physical) size of the plugin window, but apparently NOT so when called from the keyboard handler (keyboardHookCallback, entering a char in text editor).  
this leads to the wrong area being redrawn.

tested with reaper and cubase 10.5 on windows 10, with a primary display @ 125% and secondary displays @ 100%

I understand that all of this is terribly intertwined, thanks for your continued work on these topics!

---

<div class="post-metadata">

**Author:** ![jcomusic](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jcomusic/32/2014_2.png) [@jcomusic](https://forum.juce.com/u/jcomusic)\
**Post date:** [April 30, 2021, 3:46pm UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/39 "2021-04-30T15:46:16Z")

</div>

looks like the not-working labels are a problem with 6.0.8 now too, even if “per monitior dpi” is enabled.

---

<div class="post-metadata">

**Author:** ![xeneize](https://avatars.discourse-cdn.com/v4/letter/x/ce7236/32.png) [@xeneize](https://forum.juce.com/u/xeneize)\
**Post date:** [October 15, 2022, 3:12pm UTC](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170/40 "2022-10-15T15:12:30Z")

</div>

has it been fixed in juce 7

[Previous page](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170.md?page=1)

[Next page](https://forum.juce.com/t/vst3-plugin-editor-resizing-glitch-issues/44170.md?page=3)
