Skip to content

VST3 Does Not Scale Correctly In Some Linux Hosts #18

@astriiddev

Description

@astriiddev

Some Linux DAWs/hosts, such as Renoise, handle VST3 scaling differently, causing JUCE plugins to render cropped; especially on high DPI screens.

I was able to fix this issue by adding

void setScaleFactor(float newScale) override;

to PluginEditor.h

adding

void QDelayAudioProcessorEditor::setScaleFactor(float /* newScale */)
{
    juce::AudioProcessorEditor::setScaleFactor(audioProcessor.scale);
}

to PluginEditor.cpp while also removing any lines containing Desktop::getInstance().setGlobalScaleFactor(audioProcessor.scale); in that file

and changing QDelayAudioProcessor::setScale to

void QDelayAudioProcessor::setScale(float s)
{
    scale = s;
    saveSettings();
    
    if(auto* editor = dynamic_cast<QDelayAudioProcessorEditor*>(this->getActiveEditor()))
        editor->setScaleFactor(scale);
}

This allows the host to automatically call the scale upon loading the GUI and handle scaling changes while providing a consistent experience across various hosts and platforms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions