Using the latest Juce 5.4.1 I’m encountering the following issue by using Cubase 10.0.10 on Windows 10:
If HDPI in Cubase is activated and the Windows-Screen-Scaling is set to a value > 100% (e.g. 125%, 150%, etc.) then the rendering of the VST3 plugin gets corrupted.
The following screenshot shows the perfectly rendered plugin at 100% screen scaling (pls. see code below).
At 125% screen scaling the component size stays at 500 x 300 and the content seems to be correctly scaled by a factor of 1.25. Therefore, part of the content is just not visible.
It gets worth at a scaling of 150% where a white frame of a size of 1000 x 600 pixels appears, but the content is correctly rendered at 750 x 450 (Factor of 1.5).
Well, the issue could be with Cubase or JUCE.
It seems that the content of the plugin is always correctly scaled but the rendered view varies greatly.
VST 2.4 is heavily impacted too by just collapsing the view if resized. Nevertheless, the support has been dropped anyhow.
#include "PluginProcessor.h"
#include "PluginEditor.h"
//==============================================================================
ResizeTestAudioProcessorEditor::ResizeTestAudioProcessorEditor (ResizeTestAudioProcessor& p) : AudioProcessorEditor (&p), processor (p)
{
setResizeLimits(200, 200, 1000, 1000);
setSize (500, 300);
}
ResizeTestAudioProcessorEditor::~ResizeTestAudioProcessorEditor()
{
}
void ResizeTestAudioProcessorEditor::paint (Graphics& g)
{
int width = getWidth();
int height = getHeight();
g.setColour (Colours::white);
g.setFont (15.0f);
g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId));
g.drawRect(0, 0, width, height, 1);
g.drawText("Width: " + std::to_string(width), 0, 100, 200, 20, Justification::right);
g.drawText("Height: " + std::to_string(height), 0, 130, 200, 20, Justification::right);
}
void ResizeTestAudioProcessorEditor::resized()
{
}