From fbae2c5b2852f7952d8b442c538a039066845093 Mon Sep 17 00:00:00 2001 From: "lllucius@gmail.com" Date: Tue, 16 Dec 2014 05:40:04 +0000 Subject: [PATCH] Better initial size for AUs that are smaller than minimum dialog size. --- src/effects/audiounits/AudioUnitEffect.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/effects/audiounits/AudioUnitEffect.cpp b/src/effects/audiounits/AudioUnitEffect.cpp index 4efbc2167..7e862edd9 100644 --- a/src/effects/audiounits/AudioUnitEffect.cpp +++ b/src/effects/audiounits/AudioUnitEffect.cpp @@ -1849,7 +1849,7 @@ bool AudioUnitEffect::PopulateUI(wxWindow *parent) // This is a temporary hack to allow usage of effects from Waves. // I don't know why, but they simply do not display. Could be that - // they are "prefer" 64-bit and/or Cocoa apps. I don't want to spend + // they "prefer" 64-bit and/or Cocoa apps. I don't want to spend // too much time trying to get them to work though since I suspect // we'll have better luck once we upgrade to wx3 and become Cocoa-based. // @@ -1926,6 +1926,13 @@ bool AudioUnitEffect::PopulateUI(wxWindow *parent) mDialog->Fit(); mDialog->SetMinSize(mDialog->GetSize()); + wxSize ps = mParent->GetSize(); + if ((int) rect.size.width < ps.GetWidth()) + { + rect.size.width = ps.GetWidth(); + HIViewSetFrame(auView, &rect); + } + mEventHelper = new AudioUnitEffectEventHelper(this); mParent->PushEventHandler(mEventHelper);