mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-08 14:13:57 +01:00
Appearance on OSX is now back to normal or better
Some additional wx3 cleanup as well.
This commit is contained in:
@@ -2831,39 +2831,6 @@ EffectUIHost::~EffectUIHost()
|
||||
// wxWindow implementation
|
||||
// ============================================================================
|
||||
|
||||
#if defined(__WXMAC__)
|
||||
|
||||
// As mentioned below, we want to manipulate the window attributes, but doing
|
||||
// so causes extra events to fire and those events lead to the rebuilding of
|
||||
// the menus. Unfortunately, if this happens when a modal dialog is displayed
|
||||
// the menus become disabled until the menubar is completely rebuilt, like when
|
||||
// leaving preferecnes.
|
||||
//
|
||||
// So, we only do this when NOT displaying a modal dialog since that's really
|
||||
// only when it is needed.
|
||||
|
||||
bool EffectUIHost::Show(bool show)
|
||||
{
|
||||
if (!mIsModal)
|
||||
{
|
||||
#if !wxCHECK_VERSION(3, 0, 0)
|
||||
// We want the effects windows on the Mac to float above the project window
|
||||
// but still have normal modal dialogs appear above the effects windows and
|
||||
// not let the effect windows fall behind the project window.
|
||||
//
|
||||
// This seems to accomplish that, but time will be the real judge.
|
||||
WindowRef windowRef = (WindowRef) MacGetWindowRef();
|
||||
WindowGroupRef parentGroup = GetWindowGroup((WindowRef) ((wxFrame *)wxGetTopLevelParent(mParent))->MacGetWindowRef());
|
||||
ChangeWindowGroupAttributes(parentGroup, kWindowGroupAttrSharedActivation, kWindowGroupAttrMoveTogether);
|
||||
SetWindowGroup(windowRef, parentGroup);
|
||||
#endif
|
||||
}
|
||||
mIsModal = false;
|
||||
|
||||
return wxDialog::Show(show);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool EffectUIHost::TransferDataToWindow()
|
||||
{
|
||||
return mEffect->TransferDataToWindow();
|
||||
@@ -2880,11 +2847,6 @@ bool EffectUIHost::TransferDataFromWindow()
|
||||
|
||||
int EffectUIHost::ShowModal()
|
||||
{
|
||||
#if defined(__WXMAC__)
|
||||
// See explanation in EffectUIHost::Show()
|
||||
mIsModal = true;
|
||||
#endif
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
// Swap the Close and Apply buttons
|
||||
wxSizer *sz = mApplyBtn->GetContainingSizer();
|
||||
|
||||
@@ -506,10 +506,6 @@ public:
|
||||
EffectUIClientInterface *client);
|
||||
virtual ~EffectUIHost();
|
||||
|
||||
#if defined(__WXMAC__)
|
||||
virtual bool Show(bool show = true);
|
||||
#endif
|
||||
|
||||
virtual bool TransferDataToWindow();
|
||||
virtual bool TransferDataFromWindow();
|
||||
|
||||
@@ -560,10 +556,6 @@ private:
|
||||
bool mIsGUI;
|
||||
bool mIsBatch;
|
||||
|
||||
#if defined(__WXMAC__)
|
||||
bool mIsModal;
|
||||
#endif
|
||||
|
||||
wxButton *mApplyBtn;
|
||||
wxButton *mCloseBtn;
|
||||
wxButton *mMenuBtn;
|
||||
|
||||
Reference in New Issue
Block a user