I’m having a problem with VST3 Audio Plugin resizing in Cubase 10 on OSX.
Please see screenshot:
It can be tested by just using the empty Audio Plugin project with small changes (pls. see below). A faster resizing causes a black border and a shifted rendering.
It can even happen that it does not render at all (black component).
The issue is much more evident in a larger project with more components to be rendered (like a StretchableLayoutManager).
/*
==============================================================================
This file was auto-generated!
It contains the basic framework code for a JUCE plugin editor.
==============================================================================
*/
#include "PluginProcessor.h"
#include "PluginEditor.h"
//==============================================================================
ResizeTestAudioProcessorEditor::ResizeTestAudioProcessorEditor (ResizeTestAudioProcessor& p)
: AudioProcessorEditor (&p), processor (p)
{
// Make sure that before the constructor has finished, you've set the
// editor's size to whatever you need it to be.
setResizeLimits(100, 100, 600, 600);
setSize (400, 300);
}
ResizeTestAudioProcessorEditor::~ResizeTestAudioProcessorEditor()
{
}
//==============================================================================
void ResizeTestAudioProcessorEditor::paint (Graphics& g)
{
int width = getWidth();
int height = getHeight();
// (Our component is opaque, so we must completely fill the background with a solid colour)
g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId));
g.setColour (Colours::white);
g.setFont (15.0f);
g.drawFittedText ("Hello World!", 0, 0, width, height, Justification::centred, 1);
// draw an outline around the component
g.drawRect(0, 0, width, height, 1);
}
void ResizeTestAudioProcessorEditor::resized()
{
// This is generally where you'll want to lay out the positions of any
// subcomponents in your editor..
}