From a002b994f401afc012c61bdcfeb4fba7e182fec1 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Wed, 11 Mar 2020 23:24:30 +0100 Subject: [PATCH] Initialize the VST editor rect with correct size --- vst/SfizzVstEditor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vst/SfizzVstEditor.cpp b/vst/SfizzVstEditor.cpp index 826a8930..cd683d3b 100644 --- a/vst/SfizzVstEditor.cpp +++ b/vst/SfizzVstEditor.cpp @@ -13,8 +13,10 @@ using namespace VSTGUI; +static ViewRect sfizzUiViewRect {0, 0, 684, 684}; + SfizzVstEditor::SfizzVstEditor(void *controller) - : VSTGUIEditor(controller), + : VSTGUIEditor(controller, &sfizzUiViewRect), _logo("logo.png") { getController()->addSfizzStateListener(this); @@ -29,7 +31,7 @@ bool PLUGIN_API SfizzVstEditor::open(void* parent, const VSTGUI::PlatformType& p { fprintf(stderr, "[sfizz] about to open view with parent %p\n", parent); - CRect wsize(0, 0, _logo.getWidth(), _logo.getHeight()); + CRect wsize(0, 0, sfizzUiViewRect.getWidth(), sfizzUiViewRect.getHeight()); CFrame *frame = new CFrame(wsize, this); this->frame = frame;