parent
84c0a0b666
commit
4d78e353c3
|
@ -52,6 +52,7 @@ class AboutDialog:public wxDialog {
|
||||||
|
|
||||||
void OnOK(wxCommandEvent & event);
|
void OnOK(wxCommandEvent & event);
|
||||||
|
|
||||||
|
wxBoxSizer *topsizer;
|
||||||
wxStaticBitmap *icon;
|
wxStaticBitmap *icon;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
|
|
|
@ -105,9 +105,8 @@ LabelDialog::LabelDialog(wxWindow *parent,
|
||||||
{
|
{
|
||||||
SetName(GetTitle());
|
SetName(GetTitle());
|
||||||
|
|
||||||
{
|
|
||||||
// Create the main sizer
|
// Create the main sizer
|
||||||
auto vs = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
wxBoxSizer *vs = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
||||||
// A little instruction
|
// A little instruction
|
||||||
wxStaticText *instruct =
|
wxStaticText *instruct =
|
||||||
|
@ -125,22 +124,19 @@ LabelDialog::LabelDialog(wxWindow *parent,
|
||||||
vs->Add(mGrid, 1, wxEXPAND | wxALL, 5);
|
vs->Add(mGrid, 1, wxEXPAND | wxALL, 5);
|
||||||
|
|
||||||
// Create the action buttons
|
// Create the action buttons
|
||||||
{
|
wxBoxSizer *hs = new wxBoxSizer(wxHORIZONTAL);
|
||||||
auto hs = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
|
|
||||||
hs->Add(safenew wxButton(this, ID_INSERTA, _("Insert &After")), 1, wxCENTER | wxALL, 5);
|
hs->Add(safenew wxButton(this, ID_INSERTA, _("Insert &After")), 1, wxCENTER | wxALL, 5);
|
||||||
hs->Add(safenew wxButton(this, ID_INSERTB, _("Insert &Before")), 1, wxCENTER | wxALL, 5);
|
hs->Add(safenew wxButton(this, ID_INSERTB, _("Insert &Before")), 1, wxCENTER | wxALL, 5);
|
||||||
hs->Add(safenew wxButton(this, ID_REMOVE, _("&Remove")), 1, wxCENTER | wxALL, 5);
|
hs->Add(safenew wxButton(this, ID_REMOVE, _("&Remove")), 1, wxCENTER | wxALL, 5);
|
||||||
hs->Add(safenew wxButton(this, ID_IMPORT, _("&Import...")), 1, wxCENTER | wxALL, 5);
|
hs->Add(safenew wxButton(this, ID_IMPORT, _("&Import...")), 1, wxCENTER | wxALL, 5);
|
||||||
hs->Add(safenew wxButton(this, ID_EXPORT, _("&Export...")), 1, wxCENTER | wxALL, 5);
|
hs->Add(safenew wxButton(this, ID_EXPORT, _("&Export...")), 1, wxCENTER | wxALL, 5);
|
||||||
vs->Add(hs.release(), 0, wxEXPAND | wxCENTER | wxALL, 5);
|
vs->Add(hs, 0, wxEXPAND | wxCENTER | wxALL, 5);
|
||||||
}
|
|
||||||
|
|
||||||
// Create the exit buttons
|
// Create the exit buttons
|
||||||
vs->Add(CreateStdButtonSizer(this, eCancelButton | eOkButton).release(), 0, wxEXPAND);
|
vs->Add(CreateStdButtonSizer(this, eCancelButton|eOkButton), 0, wxEXPAND);
|
||||||
|
|
||||||
// Make it so
|
// Make it so
|
||||||
SetSizer(vs.release());
|
SetSizer(vs);
|
||||||
}
|
|
||||||
|
|
||||||
// Build the initial (empty) grid
|
// Build the initial (empty) grid
|
||||||
mGrid->CreateGrid(0, Col_Max);
|
mGrid->CreateGrid(0, Col_Max);
|
||||||
|
|
|
@ -1002,7 +1002,7 @@ MixerBoard::MixerBoard(AudacityProject* pProject,
|
||||||
mScrolledWindow->SetVirtualSize(size);
|
mScrolledWindow->SetVirtualSize(size);
|
||||||
|
|
||||||
/* This doesn't work to make the mScrolledWindow automatically resize, so do it explicitly in OnSize.
|
/* This doesn't work to make the mScrolledWindow automatically resize, so do it explicitly in OnSize.
|
||||||
auto pBoxSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
wxBoxSizer* pBoxSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
pBoxSizer->Add(mScrolledWindow, 0, wxExpand, 0);
|
pBoxSizer->Add(mScrolledWindow, 0, wxExpand, 0);
|
||||||
this->SetAutoLayout(true);
|
this->SetAutoLayout(true);
|
||||||
this->SetSizer(pBoxSizer);
|
this->SetSizer(pBoxSizer);
|
||||||
|
|
|
@ -927,7 +927,7 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
wxDefaultSize,
|
wxDefaultSize,
|
||||||
wxNO_BORDER);
|
wxNO_BORDER);
|
||||||
mMainPanel->SetSizer( safenew wxBoxSizer(wxVERTICAL) );
|
mMainPanel->SetSizer( new wxBoxSizer(wxVERTICAL) );
|
||||||
pPage = mMainPanel;
|
pPage = mMainPanel;
|
||||||
// Set the colour here to the track panel background to avoid
|
// Set the colour here to the track panel background to avoid
|
||||||
// flicker when Audacity starts up.
|
// flicker when Audacity starts up.
|
||||||
|
@ -937,17 +937,13 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
|
||||||
//pPage->SetBackgroundColour( theTheme.Colour( clrDark ));
|
//pPage->SetBackgroundColour( theTheme.Colour( clrDark ));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxBoxSizer *bs;
|
wxBoxSizer *bs = new wxBoxSizer( wxVERTICAL );
|
||||||
{
|
|
||||||
auto ubs = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
bs = ubs.get();
|
|
||||||
bs->Add( mToolManager->GetTopDock(), 0, wxEXPAND | wxALIGN_TOP );
|
bs->Add( mToolManager->GetTopDock(), 0, wxEXPAND | wxALIGN_TOP );
|
||||||
bs->Add( mRuler, 0, wxEXPAND );
|
bs->Add( mRuler, 0, wxEXPAND );
|
||||||
bs->Add( pPage, 1, wxEXPAND );
|
bs->Add( pPage, 1, wxEXPAND );
|
||||||
bs->Add( mToolManager->GetBotDock(), 0, wxEXPAND );
|
bs->Add( mToolManager->GetBotDock(), 0, wxEXPAND );
|
||||||
SetAutoLayout( true );
|
SetAutoLayout( true );
|
||||||
SetSizer(ubs.release());
|
SetSizer( bs );
|
||||||
}
|
|
||||||
bs->Layout();
|
bs->Layout();
|
||||||
|
|
||||||
// The right hand side translates to NEW TrackPanel(... in normal
|
// The right hand side translates to NEW TrackPanel(... in normal
|
||||||
|
@ -978,35 +974,31 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
|
||||||
|
|
||||||
bs = (wxBoxSizer *) pPage->GetSizer();
|
bs = (wxBoxSizer *) pPage->GetSizer();
|
||||||
|
|
||||||
{
|
wxBoxSizer *hs;
|
||||||
|
wxBoxSizer *vs;
|
||||||
|
|
||||||
// Top horizontal grouping
|
// Top horizontal grouping
|
||||||
auto hs = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
|
hs = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
// Track panel
|
// Track panel
|
||||||
hs->Add( mTrackPanel, 1, wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP );
|
hs->Add( mTrackPanel, 1, wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP );
|
||||||
|
|
||||||
{
|
|
||||||
// Vertical grouping
|
// Vertical grouping
|
||||||
auto vs = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
vs = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
// Vertical scroll bar
|
// Vertical scroll bar
|
||||||
vs->Add( mVsbar, 1, wxEXPAND | wxALIGN_TOP );
|
vs->Add( mVsbar, 1, wxEXPAND | wxALIGN_TOP );
|
||||||
hs->Add(vs.release(), 0, wxEXPAND | wxALIGN_TOP);
|
hs->Add( vs, 0, wxEXPAND | wxALIGN_TOP );
|
||||||
}
|
bs->Add( hs, 1, wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP );
|
||||||
|
|
||||||
bs->Add(hs.release(), 1, wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// Bottom horizontal grouping
|
// Bottom horizontal grouping
|
||||||
auto hs = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
|
hs = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
// Bottom scrollbar
|
// Bottom scrollbar
|
||||||
hs->Add( mTrackPanel->GetLeftOffset() - 1, 0 );
|
hs->Add( mTrackPanel->GetLeftOffset() - 1, 0 );
|
||||||
hs->Add( mHsbar, 1, wxALIGN_BOTTOM );
|
hs->Add( mHsbar, 1, wxALIGN_BOTTOM );
|
||||||
hs->Add( mVsbar->GetSize().GetWidth(), 0 );
|
hs->Add( mVsbar->GetSize().GetWidth(), 0 );
|
||||||
bs->Add(hs.release(), 0, wxEXPAND | wxALIGN_LEFT);
|
bs->Add( hs, 0, wxEXPAND | wxALIGN_LEFT );
|
||||||
}
|
|
||||||
|
|
||||||
// Lay it out
|
// Lay it out
|
||||||
pPage->SetAutoLayout(true);
|
pPage->SetAutoLayout(true);
|
||||||
|
|
|
@ -707,7 +707,7 @@ wxStaticBox * ShuttleGuiBase::StartStatic(const wxString &Str, int iProp)
|
||||||
Str );
|
Str );
|
||||||
pBox->SetLabel( Str );
|
pBox->SetLabel( Str );
|
||||||
pBox->SetName(wxStripMenuCodes(Str));
|
pBox->SetName(wxStripMenuCodes(Str));
|
||||||
mpSubSizer = std::make_unique<wxStaticBoxSizer>(
|
mpSubSizer = new wxStaticBoxSizer(
|
||||||
pBox,
|
pBox,
|
||||||
wxVERTICAL );
|
wxVERTICAL );
|
||||||
miSizerProp = iProp;
|
miSizerProp = iProp;
|
||||||
|
@ -973,7 +973,7 @@ void ShuttleGuiBase::StartHorizontalLay( int PositionFlags, int iProp)
|
||||||
if( mShuttleMode != eIsCreating )
|
if( mShuttleMode != eIsCreating )
|
||||||
return;
|
return;
|
||||||
miSizerProp=iProp;
|
miSizerProp=iProp;
|
||||||
mpSubSizer = std::make_unique<wxBoxSizer>( wxHORIZONTAL );
|
mpSubSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
UpdateSizersCore( false, PositionFlags | wxALL );
|
UpdateSizersCore( false, PositionFlags | wxALL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -989,7 +989,7 @@ void ShuttleGuiBase::StartVerticalLay(int iProp)
|
||||||
if( mShuttleMode != eIsCreating )
|
if( mShuttleMode != eIsCreating )
|
||||||
return;
|
return;
|
||||||
miSizerProp=iProp;
|
miSizerProp=iProp;
|
||||||
mpSubSizer = std::make_unique<wxBoxSizer>( wxVERTICAL );
|
mpSubSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
UpdateSizers();
|
UpdateSizers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1004,7 +1004,7 @@ void ShuttleGuiBase::StartMultiColumn(int nCols, int PositionFlags)
|
||||||
{
|
{
|
||||||
if( mShuttleMode != eIsCreating )
|
if( mShuttleMode != eIsCreating )
|
||||||
return;
|
return;
|
||||||
mpSubSizer = std::make_unique<wxFlexGridSizer>( nCols );
|
mpSubSizer = new wxFlexGridSizer( nCols );
|
||||||
UpdateSizersCore( false, PositionFlags | wxALL );
|
UpdateSizersCore( false, PositionFlags | wxALL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1935,16 +1935,16 @@ void ShuttleGuiBase::UpdateSizersCore(bool bPrepend, int Flags)
|
||||||
{
|
{
|
||||||
// When adding sizers into sizers, don't add a border.
|
// When adding sizers into sizers, don't add a border.
|
||||||
// unless it's a static box sizer.
|
// unless it's a static box sizer.
|
||||||
wxSizer *const pSubSizer = mpSubSizer.get();
|
if( wxDynamicCast( mpSubSizer, wxStaticBoxSizer ))
|
||||||
if (wxDynamicCast(pSubSizer, wxStaticBoxSizer))
|
|
||||||
{
|
{
|
||||||
mpSizer->Add( mpSubSizer.release(), miSizerProp, Flags , miBorder);
|
mpSizer->Add( mpSubSizer,miSizerProp, Flags , miBorder);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mpSizer->Add( mpSubSizer.release(), miSizerProp, Flags ,0);//miBorder);
|
mpSizer->Add( mpSubSizer,miSizerProp, Flags ,0);//miBorder);
|
||||||
}
|
}
|
||||||
mpSizer = pSubSizer;
|
mpSizer = mpSubSizer;
|
||||||
|
mpSubSizer = NULL;
|
||||||
PushSizer();
|
PushSizer();
|
||||||
}
|
}
|
||||||
mpLastWind = mpWind;
|
mpLastWind = mpWind;
|
||||||
|
@ -2116,7 +2116,7 @@ AttachableScrollBar * ShuttleGui::AddAttachableScrollBar( long style )
|
||||||
return pAttachableScrollBar;
|
return pAttachableScrollBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<wxSizer> CreateStdButtonSizer(wxWindow *parent, long buttons, wxWindow *extra)
|
wxSizer *CreateStdButtonSizer(wxWindow *parent, long buttons, wxWindow *extra)
|
||||||
{
|
{
|
||||||
wxASSERT(parent != NULL); // To justify safenew
|
wxASSERT(parent != NULL); // To justify safenew
|
||||||
|
|
||||||
|
@ -2136,7 +2136,7 @@ std::unique_ptr<wxSizer> CreateStdButtonSizer(wxWindow *parent, long buttons, wx
|
||||||
}
|
}
|
||||||
|
|
||||||
wxButton *b = NULL;
|
wxButton *b = NULL;
|
||||||
auto bs = std::make_unique<wxStdDialogButtonSizer>();
|
wxStdDialogButtonSizer *bs = new wxStdDialogButtonSizer();
|
||||||
|
|
||||||
if( buttons & eOkButton )
|
if( buttons & eOkButton )
|
||||||
{
|
{
|
||||||
|
@ -2226,8 +2226,9 @@ std::unique_ptr<wxSizer> CreateStdButtonSizer(wxWindow *parent, long buttons, wx
|
||||||
bs->Insert( lastLastSpacer + 1, b, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, margin );
|
bs->Insert( lastLastSpacer + 1, b, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, margin );
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<wxSizer> s = std::make_unique<wxBoxSizer>( wxVERTICAL );
|
wxSizer * s;
|
||||||
s->Add( bs.release(), 1, wxEXPAND | wxALL, 7 );
|
s = new wxBoxSizer( wxVERTICAL );
|
||||||
|
s->Add( bs, 1, wxEXPAND | wxALL, 7 );
|
||||||
s->Add( 0, 3 ); // a little extra space
|
s->Add( 0, 3 ); // a little extra space
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
|
|
|
@ -313,7 +313,7 @@ protected:
|
||||||
// Proportion set by user rather than default.
|
// Proportion set by user rather than default.
|
||||||
int miPropSetByUser;
|
int miPropSetByUser;
|
||||||
|
|
||||||
std::unique_ptr<wxSizer> mpSubSizer;
|
wxSizer * mpSubSizer;
|
||||||
wxSizer * mpSizer;
|
wxSizer * mpSizer;
|
||||||
wxWindow * mpParent;
|
wxWindow * mpParent;
|
||||||
wxWindow * mpWind;
|
wxWindow * mpWind;
|
||||||
|
@ -358,7 +358,7 @@ enum
|
||||||
eCloseID = wxID_CANCEL
|
eCloseID = wxID_CANCEL
|
||||||
};
|
};
|
||||||
|
|
||||||
AUDACITY_DLL_API std::unique_ptr<wxSizer> CreateStdButtonSizer( wxWindow *parent,
|
AUDACITY_DLL_API wxSizer *CreateStdButtonSizer( wxWindow *parent,
|
||||||
long buttons = eOkButton | eCancelButton,
|
long buttons = eOkButton | eCancelButton,
|
||||||
wxWindow *extra = NULL );
|
wxWindow *extra = NULL );
|
||||||
|
|
||||||
|
|
|
@ -2887,11 +2887,10 @@ int EffectUIHost::ShowModal()
|
||||||
|
|
||||||
bool EffectUIHost::Initialize()
|
bool EffectUIHost::Initialize()
|
||||||
{
|
{
|
||||||
|
wxBoxSizer *vs = new wxBoxSizer(wxVERTICAL);
|
||||||
|
wxBoxSizer *hs = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
|
||||||
EffectPanel *w = safenew EffectPanel(this);
|
EffectPanel *w = safenew EffectPanel(this);
|
||||||
{
|
|
||||||
auto vs = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
{
|
|
||||||
auto hs = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
|
|
||||||
|
|
||||||
// Try to give the window a sensible default/minimum size
|
// Try to give the window a sensible default/minimum size
|
||||||
w->SetMinSize(wxSize(wxMax(600, mParent->GetSize().GetWidth() * 2 / 3),
|
w->SetMinSize(wxSize(wxMax(600, mParent->GetSize().GetWidth() * 2 / 3),
|
||||||
|
@ -2907,8 +2906,7 @@ bool EffectUIHost::Initialize()
|
||||||
}
|
}
|
||||||
|
|
||||||
hs->Add(w, 1, wxEXPAND);
|
hs->Add(w, 1, wxEXPAND);
|
||||||
vs->Add(hs.release(), 1, wxEXPAND);
|
vs->Add(hs, 1, wxEXPAND);
|
||||||
}
|
|
||||||
|
|
||||||
wxPanel *buttonPanel = safenew wxPanel(this, wxID_ANY);
|
wxPanel *buttonPanel = safenew wxPanel(this, wxID_ANY);
|
||||||
wxPanel *const bar = safenew wxPanel(buttonPanel, wxID_ANY);
|
wxPanel *const bar = safenew wxPanel(buttonPanel, wxID_ANY);
|
||||||
|
@ -3054,12 +3052,10 @@ bool EffectUIHost::Initialize()
|
||||||
buttons += eDebugButton;
|
buttons += eDebugButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
buttonPanel->SetSizer(CreateStdButtonSizer(buttonPanel, buttons, bar).release());
|
buttonPanel->SetSizer(CreateStdButtonSizer(buttonPanel, buttons, bar));
|
||||||
vs->Add(buttonPanel, 0, wxEXPAND);
|
vs->Add(buttonPanel, 0, wxEXPAND);
|
||||||
|
|
||||||
SetSizer(vs.release());
|
SetSizer(vs);
|
||||||
}
|
|
||||||
|
|
||||||
Layout();
|
Layout();
|
||||||
Fit();
|
Fit();
|
||||||
Center();
|
Center();
|
||||||
|
|
|
@ -104,12 +104,10 @@ EffectRack::EffectRack()
|
||||||
mRemovePushed = CreateBitmap(remove_16x16_xpm, false, true);
|
mRemovePushed = CreateBitmap(remove_16x16_xpm, false, true);
|
||||||
mRemoveRaised = CreateBitmap(remove_16x16_xpm, true, true);
|
mRemoveRaised = CreateBitmap(remove_16x16_xpm, true, true);
|
||||||
|
|
||||||
{
|
wxBoxSizer *bs = new wxBoxSizer(wxVERTICAL);
|
||||||
auto bs = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
mPanel = safenew wxPanel(this, wxID_ANY);
|
mPanel = safenew wxPanel(this, wxID_ANY);
|
||||||
bs->Add(mPanel, 1, wxEXPAND);
|
bs->Add(mPanel, 1, wxEXPAND);
|
||||||
SetSizer(bs.release());
|
SetSizer(bs);
|
||||||
}
|
|
||||||
|
|
||||||
wxBoxSizer *hs = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *hs = new wxBoxSizer(wxHORIZONTAL);
|
||||||
wxASSERT(mPanel); // To justify safenew
|
wxASSERT(mPanel); // To justify safenew
|
||||||
|
@ -120,8 +118,7 @@ EffectRack::EffectRack()
|
||||||
hs->AddStretchSpacer();
|
hs->AddStretchSpacer();
|
||||||
hs->Add(safenew wxToggleButton(mPanel, wxID_CLEAR, _("&Bypass")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
|
hs->Add(safenew wxToggleButton(mPanel, wxID_CLEAR, _("&Bypass")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
|
||||||
|
|
||||||
{
|
bs = new wxBoxSizer(wxVERTICAL);
|
||||||
auto bs = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
bs->Add(hs, 0, wxEXPAND);
|
bs->Add(hs, 0, wxEXPAND);
|
||||||
bs->Add(safenew wxStaticLine(mPanel, wxID_ANY), 0, wxEXPAND);
|
bs->Add(safenew wxStaticLine(mPanel, wxID_ANY), 0, wxEXPAND);
|
||||||
|
|
||||||
|
@ -131,8 +128,7 @@ EffectRack::EffectRack()
|
||||||
mMainSizer->SetVGap(0);
|
mMainSizer->SetVGap(0);
|
||||||
bs->Add(mMainSizer, 1, wxEXPAND);
|
bs->Add(mMainSizer, 1, wxEXPAND);
|
||||||
|
|
||||||
mPanel->SetSizer(bs.release());
|
mPanel->SetSizer(bs);
|
||||||
}
|
|
||||||
|
|
||||||
wxString oldPath = gPrefs->GetPath();
|
wxString oldPath = gPrefs->GetPath();
|
||||||
gPrefs->SetPath(wxT("/EffectsRack"));
|
gPrefs->SetPath(wxT("/EffectsRack"));
|
||||||
|
|
|
@ -2825,14 +2825,12 @@ void VSTEffect::BuildFancy()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
auto mainSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
|
|
||||||
mainSizer->Add(mControl, 0, wxALIGN_CENTER);
|
mainSizer->Add(mControl, 0, wxALIGN_CENTER);
|
||||||
|
|
||||||
mParent->SetMinSize(wxDefaultSize);
|
mParent->SetMinSize(wxDefaultSize);
|
||||||
mParent->SetSizer(mainSizer.release());
|
mParent->SetSizer(mainSizer);
|
||||||
}
|
|
||||||
|
|
||||||
NeedEditIdle(true);
|
NeedEditIdle(true);
|
||||||
|
|
||||||
|
@ -2843,6 +2841,7 @@ void VSTEffect::BuildFancy()
|
||||||
|
|
||||||
void VSTEffect::BuildPlain()
|
void VSTEffect::BuildPlain()
|
||||||
{
|
{
|
||||||
|
wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
wxASSERT(mParent); // To justify safenew
|
wxASSERT(mParent); // To justify safenew
|
||||||
wxScrolledWindow *const scroller = safenew wxScrolledWindow(mParent,
|
wxScrolledWindow *const scroller = safenew wxScrolledWindow(mParent,
|
||||||
wxID_ANY,
|
wxID_ANY,
|
||||||
|
@ -2850,9 +2849,6 @@ void VSTEffect::BuildPlain()
|
||||||
wxDefaultSize,
|
wxDefaultSize,
|
||||||
wxVSCROLL | wxTAB_TRAVERSAL);
|
wxVSCROLL | wxTAB_TRAVERSAL);
|
||||||
|
|
||||||
{
|
|
||||||
auto mainSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
|
|
||||||
// Try to give the window a sensible default/minimum size
|
// Try to give the window a sensible default/minimum size
|
||||||
scroller->SetMinSize(wxSize(wxMax(600, mParent->GetSize().GetWidth() * 2 / 3),
|
scroller->SetMinSize(wxSize(wxMax(600, mParent->GetSize().GetWidth() * 2 / 3),
|
||||||
mParent->GetSize().GetHeight() / 2));
|
mParent->GetSize().GetHeight() / 2));
|
||||||
|
@ -2863,19 +2859,16 @@ void VSTEffect::BuildPlain()
|
||||||
scroller->SetLabel(wxT("\a"));
|
scroller->SetLabel(wxT("\a"));
|
||||||
|
|
||||||
mainSizer->Add(scroller, 1, wxEXPAND | wxALL, 5);
|
mainSizer->Add(scroller, 1, wxEXPAND | wxALL, 5);
|
||||||
mParent->SetSizer(mainSizer.release());
|
mParent->SetSizer(mainSizer);
|
||||||
}
|
|
||||||
|
|
||||||
mNames = new wxStaticText *[mAEffect->numParams];
|
mNames = new wxStaticText *[mAEffect->numParams];
|
||||||
mSliders = new wxSlider *[mAEffect->numParams];
|
mSliders = new wxSlider *[mAEffect->numParams];
|
||||||
mDisplays = new wxStaticText *[mAEffect->numParams];
|
mDisplays = new wxStaticText *[mAEffect->numParams];
|
||||||
mLabels = new wxStaticText *[mAEffect->numParams];
|
mLabels = new wxStaticText *[mAEffect->numParams];
|
||||||
|
|
||||||
{
|
wxSizer *paramSizer = new wxStaticBoxSizer(wxVERTICAL, scroller, _("Effect Settings"));
|
||||||
auto paramSizer = std::make_unique<wxStaticBoxSizer>(wxVERTICAL, scroller, _("Effect Settings"));
|
|
||||||
|
|
||||||
{
|
wxFlexGridSizer *gridSizer = new wxFlexGridSizer(4, 0, 0);
|
||||||
auto gridSizer = std::make_unique<wxFlexGridSizer>(4, 0, 0);
|
|
||||||
gridSizer->AddGrowableCol(1);
|
gridSizer->AddGrowableCol(1);
|
||||||
|
|
||||||
// Add the duration control for generators
|
// Add the duration control for generators
|
||||||
|
@ -2958,10 +2951,8 @@ void VSTEffect::BuildPlain()
|
||||||
gridSizer->Add(mLabels[i], 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, 5);
|
gridSizer->Add(mLabels[i], 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
paramSizer->Add(gridSizer.release(), 1, wxEXPAND | wxALL, 5);
|
paramSizer->Add(gridSizer, 1, wxEXPAND | wxALL, 5);
|
||||||
}
|
scroller->SetSizer(paramSizer);
|
||||||
scroller->SetSizer(paramSizer.release());
|
|
||||||
}
|
|
||||||
|
|
||||||
RefreshParameters();
|
RefreshParameters();
|
||||||
|
|
||||||
|
|
|
@ -1164,15 +1164,13 @@ bool LadspaEffect::PopulateUI(wxWindow *parent)
|
||||||
|
|
||||||
memset(mFields, 0, mData->PortCount * sizeof(wxTextCtrl *));
|
memset(mFields, 0, mData->PortCount * sizeof(wxTextCtrl *));
|
||||||
|
|
||||||
|
wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
wxASSERT(mParent); // To justify safenew
|
||||||
wxScrolledWindow *const w = safenew wxScrolledWindow(mParent,
|
wxScrolledWindow *const w = safenew wxScrolledWindow(mParent,
|
||||||
wxID_ANY,
|
wxID_ANY,
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
wxDefaultSize,
|
wxDefaultSize,
|
||||||
wxVSCROLL | wxTAB_TRAVERSAL);
|
wxVSCROLL | wxTAB_TRAVERSAL);
|
||||||
|
|
||||||
{
|
|
||||||
auto mainSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
wxASSERT(mParent); // To justify safenew
|
|
||||||
w->SetScrollRate(0, 20);
|
w->SetScrollRate(0, 20);
|
||||||
|
|
||||||
// This fools NVDA into not saying "Panel" when the dialog gets focus
|
// This fools NVDA into not saying "Panel" when the dialog gets focus
|
||||||
|
@ -1180,19 +1178,15 @@ bool LadspaEffect::PopulateUI(wxWindow *parent)
|
||||||
w->SetLabel(wxT("\a"));
|
w->SetLabel(wxT("\a"));
|
||||||
|
|
||||||
mainSizer->Add(w, 1, wxEXPAND);
|
mainSizer->Add(w, 1, wxEXPAND);
|
||||||
mParent->SetSizer(mainSizer.release());
|
mParent->SetSizer(mainSizer);
|
||||||
}
|
|
||||||
|
|
||||||
wxSizer *marginSizer;
|
wxSizer *marginSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
{
|
|
||||||
auto uMarginSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
marginSizer = uMarginSizer.get();
|
|
||||||
|
|
||||||
if (mNumInputControls)
|
if (mNumInputControls)
|
||||||
{
|
{
|
||||||
auto paramSizer = std::make_unique<wxStaticBoxSizer>(wxVERTICAL, w, _("Effect Settings"));
|
wxStaticBoxSizer *paramSizer = new wxStaticBoxSizer(wxVERTICAL, w, _("Effect Settings"));
|
||||||
|
|
||||||
auto gridSizer = std::make_unique<wxFlexGridSizer>(5, 0, 0);
|
wxFlexGridSizer *gridSizer = new wxFlexGridSizer(5, 0, 0);
|
||||||
gridSizer->AddGrowableCol(3);
|
gridSizer->AddGrowableCol(3);
|
||||||
|
|
||||||
wxControl *item;
|
wxControl *item;
|
||||||
|
@ -1379,15 +1373,15 @@ bool LadspaEffect::PopulateUI(wxWindow *parent)
|
||||||
mFields[p]->SetValue(fieldText);
|
mFields[p]->SetValue(fieldText);
|
||||||
}
|
}
|
||||||
|
|
||||||
paramSizer->Add(gridSizer.release(), 0, wxEXPAND | wxALL, 5);
|
paramSizer->Add(gridSizer, 0, wxEXPAND | wxALL, 5);
|
||||||
marginSizer->Add(paramSizer.release(), 0, wxEXPAND | wxALL, 5);
|
marginSizer->Add(paramSizer, 0, wxEXPAND | wxALL, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mNumOutputControls > 0 )
|
if (mNumOutputControls > 0 )
|
||||||
{
|
{
|
||||||
auto paramSizer = std::make_unique<wxStaticBoxSizer>(wxVERTICAL, w, _("Effect Output"));
|
wxSizer *paramSizer = new wxStaticBoxSizer(wxVERTICAL, w, _("Effect Output"));
|
||||||
|
|
||||||
auto gridSizer = std::make_unique<wxFlexGridSizer>(2, 0, 0);
|
wxFlexGridSizer *gridSizer = new wxFlexGridSizer(2, 0, 0);
|
||||||
gridSizer->AddGrowableCol(1);
|
gridSizer->AddGrowableCol(1);
|
||||||
|
|
||||||
wxControl *item;
|
wxControl *item;
|
||||||
|
@ -1442,15 +1436,13 @@ bool LadspaEffect::PopulateUI(wxWindow *parent)
|
||||||
gridSizer->Add(mMeters[p], 1, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
gridSizer->Add(mMeters[p], 1, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
paramSizer->Add(gridSizer.release(), 0, wxEXPAND | wxALL, 5);
|
paramSizer->Add(gridSizer, 0, wxEXPAND | wxALL, 5);
|
||||||
marginSizer->Add(paramSizer.release(), 0, wxEXPAND | wxALL, 5);
|
marginSizer->Add(paramSizer, 0, wxEXPAND | wxALL, 5);
|
||||||
|
|
||||||
RefreshControls(true);
|
RefreshControls(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
w->SetSizer(uMarginSizer.release());
|
w->SetSizer(marginSizer);
|
||||||
}
|
|
||||||
|
|
||||||
w->Layout();
|
w->Layout();
|
||||||
|
|
||||||
// Try to give the window a sensible default/minimum size
|
// Try to give the window a sensible default/minimum size
|
||||||
|
|
|
@ -1465,11 +1465,11 @@ bool LV2Effect::BuildFancy()
|
||||||
wxSizerItem *si = NULL;
|
wxSizerItem *si = NULL;
|
||||||
if (vs)
|
if (vs)
|
||||||
{
|
{
|
||||||
auto hs = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
|
wxBoxSizer *hs = new wxBoxSizer(wxHORIZONTAL);
|
||||||
if (hs)
|
if (hs)
|
||||||
{
|
{
|
||||||
si = hs->Add(mContainer, 1, wxCENTER | wxEXPAND);
|
si = hs->Add(mContainer, 1, wxCENTER | wxEXPAND);
|
||||||
vs->Add(hs.release(), 0, wxCENTER);
|
vs->Add(hs, 0, wxCENTER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1578,17 +1578,13 @@ bool LV2Effect::BuildPlain()
|
||||||
mSliders = new wxSlider *[ctrlcnt];
|
mSliders = new wxSlider *[ctrlcnt];
|
||||||
mFields = new wxTextCtrl *[ctrlcnt];
|
mFields = new wxTextCtrl *[ctrlcnt];
|
||||||
|
|
||||||
wxSizer *innerSizer;
|
wxSizer *outerSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
||||||
wxASSERT(mParent); // To justify safenew
|
wxASSERT(mParent); // To justify safenew
|
||||||
wxScrolledWindow *const w = safenew wxScrolledWindow(mParent,
|
wxScrolledWindow *const w = safenew wxScrolledWindow(mParent,
|
||||||
wxID_ANY,
|
wxID_ANY,
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
wxDefaultSize,
|
wxDefaultSize,
|
||||||
wxVSCROLL | wxTAB_TRAVERSAL);
|
wxVSCROLL | wxTAB_TRAVERSAL);
|
||||||
|
|
||||||
{
|
|
||||||
auto outerSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
w->SetScrollRate(0, 20);
|
w->SetScrollRate(0, 20);
|
||||||
|
|
||||||
// This fools NVDA into not saying "Panel" when the dialog gets focus
|
// This fools NVDA into not saying "Panel" when the dialog gets focus
|
||||||
|
@ -1597,16 +1593,14 @@ bool LV2Effect::BuildPlain()
|
||||||
|
|
||||||
outerSizer->Add(w, 1, wxEXPAND);
|
outerSizer->Add(w, 1, wxEXPAND);
|
||||||
|
|
||||||
{
|
wxSizer *innerSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
auto uInnerSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
innerSizer = uInnerSizer.get();
|
|
||||||
|
|
||||||
if (GetType() == EffectTypeGenerate)
|
if (GetType() == EffectTypeGenerate)
|
||||||
{
|
{
|
||||||
// Add the length control
|
// Add the length control
|
||||||
auto groupSizer = std::make_unique<wxStaticBoxSizer>(wxVERTICAL, w, _("Generator"));
|
wxSizer *groupSizer = new wxStaticBoxSizer(wxVERTICAL, w, _("Generator"));
|
||||||
|
|
||||||
auto sizer = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
|
wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
|
||||||
wxWindow *item = safenew wxStaticText(w, 0, _("&Duration:"));
|
wxWindow *item = safenew wxStaticText(w, 0, _("&Duration:"));
|
||||||
sizer->Add(item, 0, wxALIGN_CENTER | wxALL, 5);
|
sizer->Add(item, 0, wxALIGN_CENTER | wxALL, 5);
|
||||||
|
@ -1624,8 +1618,8 @@ bool LV2Effect::BuildPlain()
|
||||||
mDuration->EnableMenu();
|
mDuration->EnableMenu();
|
||||||
sizer->Add(mDuration, 0, wxALIGN_CENTER | wxALL, 5);
|
sizer->Add(mDuration, 0, wxALIGN_CENTER | wxALL, 5);
|
||||||
|
|
||||||
groupSizer->Add(sizer.release(), 0, wxALIGN_CENTER | wxALL, 5);
|
groupSizer->Add(sizer, 0, wxALIGN_CENTER | wxALL, 5);
|
||||||
innerSizer->Add(groupSizer.release(), 0, wxEXPAND | wxALL, 5);
|
innerSizer->Add(groupSizer, 0, wxEXPAND | wxALL, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
mGroups.Sort();
|
mGroups.Sort();
|
||||||
|
@ -1637,9 +1631,9 @@ bool LV2Effect::BuildPlain()
|
||||||
{
|
{
|
||||||
label = _("Effect Settings");
|
label = _("Effect Settings");
|
||||||
}
|
}
|
||||||
auto groupSizer = std::make_unique<wxStaticBoxSizer>(wxVERTICAL, w, label);
|
wxSizer *groupSizer = new wxStaticBoxSizer(wxVERTICAL, w, label);
|
||||||
|
|
||||||
auto gridSizer = std::make_unique<wxFlexGridSizer>(numCols, 5, 5);
|
wxFlexGridSizer *gridSizer = new wxFlexGridSizer(numCols, 5, 5);
|
||||||
gridSizer->AddGrowableCol(3);
|
gridSizer->AddGrowableCol(3);
|
||||||
|
|
||||||
const wxArrayInt & params = mGroupMap[mGroups[i]];
|
const wxArrayInt & params = mGroupMap[mGroups[i]];
|
||||||
|
@ -1798,8 +1792,8 @@ bool LV2Effect::BuildPlain()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
groupSizer->Add(gridSizer.release(), 1, wxEXPAND | wxALL, 5);
|
groupSizer->Add(gridSizer, 1, wxEXPAND | wxALL, 5);
|
||||||
innerSizer->Add(groupSizer.release(), 0, wxEXPAND | wxALL, 5);
|
innerSizer->Add(groupSizer, 0, wxEXPAND | wxALL, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
innerSizer->Layout();
|
innerSizer->Layout();
|
||||||
|
@ -1857,11 +1851,8 @@ bool LV2Effect::BuildPlain()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
w->SetSizer(uInnerSizer.release());
|
w->SetSizer(innerSizer);
|
||||||
}
|
mParent->SetSizer(outerSizer);
|
||||||
|
|
||||||
mParent->SetSizer(outerSizer.release());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Try to give the window a sensible default/minimum size
|
// Try to give the window a sensible default/minimum size
|
||||||
wxSize sz1 = innerSizer->GetMinSize();
|
wxSize sz1 = innerSizer->GetMinSize();
|
||||||
|
|
|
@ -2242,10 +2242,8 @@ NyquistOutputDialog::NyquistOutputDialog(wxWindow * parent, wxWindowID id,
|
||||||
{
|
{
|
||||||
SetName(GetTitle());
|
SetName(GetTitle());
|
||||||
|
|
||||||
wxBoxSizer *mainSizer;
|
wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
{
|
wxBoxSizer *hSizer;
|
||||||
auto uMainSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
mainSizer = uMainSizer.get();
|
|
||||||
wxButton *button;
|
wxButton *button;
|
||||||
wxControl *item;
|
wxControl *item;
|
||||||
|
|
||||||
|
@ -2260,21 +2258,17 @@ NyquistOutputDialog::NyquistOutputDialog(wxWindow * parent, wxWindowID id,
|
||||||
wxTE_MULTILINE | wxTE_READONLY);
|
wxTE_MULTILINE | wxTE_READONLY);
|
||||||
mainSizer->Add(item, 0, wxALIGN_LEFT | wxALL, 10);
|
mainSizer->Add(item, 0, wxALIGN_LEFT | wxALL, 10);
|
||||||
|
|
||||||
{
|
hSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
auto hSizer = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
|
|
||||||
|
|
||||||
/* i18n-hint: In most languages OK is to be translated as OK. It appears on a button.*/
|
/* i18n-hint: In most languages OK is to be translated as OK. It appears on a button.*/
|
||||||
button = safenew wxButton(this, wxID_OK, _("OK"));
|
button = safenew wxButton(this, wxID_OK, _("OK"));
|
||||||
button->SetDefault();
|
button->SetDefault();
|
||||||
hSizer->Add(button, 0, wxALIGN_CENTRE | wxALL, 5);
|
hSizer->Add(button, 0, wxALIGN_CENTRE | wxALL, 5);
|
||||||
|
|
||||||
mainSizer->Add(hSizer.release(), 0, wxALIGN_CENTRE | wxLEFT | wxBOTTOM | wxRIGHT, 5);
|
mainSizer->Add(hSizer, 0, wxALIGN_CENTRE | wxLEFT | wxBOTTOM | wxRIGHT, 5);
|
||||||
}
|
|
||||||
|
|
||||||
SetAutoLayout(true);
|
SetAutoLayout(true);
|
||||||
SetSizer(uMainSizer.release());
|
SetSizer(mainSizer);
|
||||||
}
|
|
||||||
|
|
||||||
mainSizer->Fit(this);
|
mainSizer->Fit(this);
|
||||||
mainSizer->SetSizeHints(this);
|
mainSizer->SetSizeHints(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1214,18 +1214,14 @@ ExportMixerDialog::ExportMixerDialog( TrackList *tracks, bool selectedOnly,
|
||||||
|
|
||||||
mMixerSpec = new MixerSpec( numTracks, maxNumChannels );
|
mMixerSpec = new MixerSpec( numTracks, maxNumChannels );
|
||||||
|
|
||||||
wxBoxSizer *vertSizer;
|
wxBoxSizer *vertSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
{
|
|
||||||
auto uVertSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
vertSizer = uVertSizer.get();
|
|
||||||
|
|
||||||
wxWindow *mixerPanel = safenew ExportMixerPanel( mMixerSpec, mTrackNames, this,
|
wxWindow *mixerPanel = safenew ExportMixerPanel( mMixerSpec, mTrackNames, this,
|
||||||
ID_MIXERPANEL, wxDefaultPosition, wxSize( 400, -1 ) );
|
ID_MIXERPANEL, wxDefaultPosition, wxSize( 400, -1 ) );
|
||||||
mixerPanel->SetName(_("Mixer Panel"));
|
mixerPanel->SetName(_("Mixer Panel"));
|
||||||
vertSizer->Add( mixerPanel, 1, wxEXPAND | wxALIGN_CENTRE | wxALL, 5 );
|
vertSizer->Add( mixerPanel, 1, wxEXPAND | wxALIGN_CENTRE | wxALL, 5 );
|
||||||
|
|
||||||
{
|
wxBoxSizer *horSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
auto horSizer = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
|
|
||||||
|
|
||||||
wxString label;
|
wxString label;
|
||||||
label.Printf( _( "Output Channels: %2d" ), mMixerSpec->GetNumChannels() );
|
label.Printf( _( "Output Channels: %2d" ), mMixerSpec->GetNumChannels() );
|
||||||
|
@ -1238,15 +1234,12 @@ ExportMixerDialog::ExportMixerDialog( TrackList *tracks, bool selectedOnly,
|
||||||
channels->SetName(label);
|
channels->SetName(label);
|
||||||
horSizer->Add( channels, 0, wxEXPAND | wxALL, 5 );
|
horSizer->Add( channels, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
vertSizer->Add(horSizer.release(), 0, wxALIGN_CENTRE | wxALL, 5);
|
vertSizer->Add( horSizer, 0, wxALIGN_CENTRE | wxALL, 5 );
|
||||||
}
|
|
||||||
|
|
||||||
vertSizer->Add(CreateStdButtonSizer(this, eCancelButton | eOkButton).release(), 0, wxEXPAND);
|
vertSizer->Add( CreateStdButtonSizer(this, eCancelButton|eOkButton), 0, wxEXPAND );
|
||||||
|
|
||||||
SetAutoLayout( true );
|
SetAutoLayout( true );
|
||||||
SetSizer(uVertSizer.release());
|
SetSizer( vertSizer );
|
||||||
}
|
|
||||||
|
|
||||||
vertSizer->Fit( this );
|
vertSizer->Fit( this );
|
||||||
vertSizer->SetSizeHints( this );
|
vertSizer->SetSizeHints( this );
|
||||||
|
|
||||||
|
|
|
@ -753,22 +753,17 @@ wxDialog( parent, id, title, position, size, style | wxRESIZE_BORDER )
|
||||||
for (wxInt32 i = 0; i < scount; i++)
|
for (wxInt32 i = 0; i < scount; i++)
|
||||||
mFile->SetStreamUsage(i,FALSE);
|
mFile->SetStreamUsage(i,FALSE);
|
||||||
|
|
||||||
wxBoxSizer *vertSizer;
|
wxBoxSizer *vertSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
{
|
|
||||||
auto uVertSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
vertSizer = uVertSizer.get();
|
|
||||||
|
|
||||||
wxArrayString *choices = mFile->GetStreamInfo();
|
wxArrayString *choices = mFile->GetStreamInfo();
|
||||||
StreamList = safenew wxListBox(this, -1, wxDefaultPosition, wxDefaultSize, *choices , wxLB_EXTENDED | wxLB_ALWAYS_SB);
|
StreamList = safenew wxListBox(this, -1, wxDefaultPosition, wxDefaultSize, *choices , wxLB_EXTENDED | wxLB_ALWAYS_SB);
|
||||||
|
|
||||||
vertSizer->Add( StreamList, 1, wxEXPAND | wxALIGN_LEFT | wxALL, 5 );
|
vertSizer->Add( StreamList, 1, wxEXPAND | wxALIGN_LEFT | wxALL, 5 );
|
||||||
|
|
||||||
vertSizer->Add(CreateStdButtonSizer(this, eCancelButton | eOkButton).release(), 0, wxEXPAND);
|
vertSizer->Add( CreateStdButtonSizer(this, eCancelButton|eOkButton), 0, wxEXPAND );
|
||||||
|
|
||||||
SetAutoLayout( true );
|
SetAutoLayout( true );
|
||||||
|
|
||||||
SetSizer(uVertSizer.release());
|
SetSizer( vertSizer );
|
||||||
}
|
|
||||||
|
|
||||||
vertSizer->Fit( this );
|
vertSizer->Fit( this );
|
||||||
|
|
||||||
|
|
|
@ -240,8 +240,8 @@ static wxString AskCopyOrEdit()
|
||||||
wxDialog dialog(NULL, -1, wxString(_("Warning")));
|
wxDialog dialog(NULL, -1, wxString(_("Warning")));
|
||||||
dialog.SetName(dialog.GetTitle());
|
dialog.SetName(dialog.GetTitle());
|
||||||
|
|
||||||
wxBoxSizer *vbox;
|
wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
|
||||||
dialog.SetSizer(vbox = safenew wxBoxSizer(wxVERTICAL));
|
dialog.SetSizer(vbox);
|
||||||
|
|
||||||
wxStaticText *message = safenew wxStaticText(&dialog, -1, wxString::Format(_("\
|
wxStaticText *message = safenew wxStaticText(&dialog, -1, wxString::Format(_("\
|
||||||
When importing uncompressed audio files you can either copy them \
|
When importing uncompressed audio files you can either copy them \
|
||||||
|
@ -261,27 +261,19 @@ How do you want to import the current file(s)?"), oldCopyPref == wxT("copy") ? _
|
||||||
|
|
||||||
wxStaticBox *box = safenew wxStaticBox(&dialog, -1, _("Choose an import method"));
|
wxStaticBox *box = safenew wxStaticBox(&dialog, -1, _("Choose an import method"));
|
||||||
box->SetName(box->GetLabel());
|
box->SetName(box->GetLabel());
|
||||||
|
wxStaticBoxSizer *boxsizer = new wxStaticBoxSizer(box, wxVERTICAL);
|
||||||
|
|
||||||
wxRadioButton *aliasRadio;
|
wxRadioButton *copyRadio = safenew wxRadioButton(&dialog, -1, _("Make a © of the files before editing (safer)"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
|
||||||
wxRadioButton *copyRadio;
|
|
||||||
wxCheckBox *dontAskNextTimeBox;
|
|
||||||
|
|
||||||
{
|
|
||||||
auto boxsizer = std::make_unique<wxStaticBoxSizer>(box, wxVERTICAL);
|
|
||||||
|
|
||||||
copyRadio = safenew wxRadioButton(&dialog, -1, _("Make a © of the files before editing (safer)"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
|
|
||||||
boxsizer->Add(copyRadio, 0, wxALL);
|
boxsizer->Add(copyRadio, 0, wxALL);
|
||||||
copyRadio->SetName(wxStripMenuCodes(copyRadio->GetLabel()));
|
copyRadio->SetName(wxStripMenuCodes(copyRadio->GetLabel()));
|
||||||
|
|
||||||
aliasRadio = safenew wxRadioButton(&dialog, -1, _("Read the files &directly from the original (faster)"));
|
wxRadioButton *aliasRadio = safenew wxRadioButton(&dialog, -1, _("Read the files &directly from the original (faster)"));
|
||||||
boxsizer->Add(aliasRadio, 0, wxALL);
|
boxsizer->Add(aliasRadio, 0, wxALL);
|
||||||
aliasRadio->SetName(wxStripMenuCodes(aliasRadio->GetLabel()));
|
aliasRadio->SetName(wxStripMenuCodes(aliasRadio->GetLabel()));
|
||||||
|
|
||||||
dontAskNextTimeBox = safenew wxCheckBox(&dialog, -1, _("Don't &warn again and always use my choice above"));
|
wxCheckBox *dontAskNextTimeBox = safenew wxCheckBox(&dialog, -1, _("Don't &warn again and always use my choice above"));
|
||||||
boxsizer->Add(dontAskNextTimeBox, 0, wxALL);
|
boxsizer->Add(dontAskNextTimeBox, 0, wxALL);
|
||||||
vbox->Add(boxsizer.release(), 0, wxALL, 10);
|
vbox->Add(boxsizer, 0, wxALL, 10);
|
||||||
}
|
|
||||||
|
|
||||||
dontAskNextTimeBox->SetName(wxStripMenuCodes(dontAskNextTimeBox->GetLabel()));
|
dontAskNextTimeBox->SetName(wxStripMenuCodes(dontAskNextTimeBox->GetLabel()));
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -282,8 +282,8 @@ void ControlToolBar::ArrangeButtons()
|
||||||
Detach( mSizer );
|
Detach( mSizer );
|
||||||
delete mSizer;
|
delete mSizer;
|
||||||
}
|
}
|
||||||
|
mSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
Add((mSizer = safenew wxBoxSizer(wxHORIZONTAL)), 1, wxEXPAND);
|
Add( mSizer, 1, wxEXPAND );
|
||||||
|
|
||||||
// Start with a little extra space
|
// Start with a little extra space
|
||||||
mSizer->Add( 5, 55 );
|
mSizer->Add( 5, 55 );
|
||||||
|
|
|
@ -113,7 +113,8 @@ void MeterToolBar::ReCreateButtons()
|
||||||
|
|
||||||
void MeterToolBar::Populate()
|
void MeterToolBar::Populate()
|
||||||
{
|
{
|
||||||
Add((mSizer = safenew wxGridBagSizer()), 1, wxEXPAND);
|
mSizer = new wxGridBagSizer();
|
||||||
|
Add( mSizer, 1, wxEXPAND );
|
||||||
|
|
||||||
if( mWhichMeters & kWithRecordMeter ){
|
if( mWhichMeters & kWithRecordMeter ){
|
||||||
//JKC: Record on left, playback on right. Left to right flow
|
//JKC: Record on left, playback on right. Left to right flow
|
||||||
|
|
|
@ -114,6 +114,7 @@ void SelectionBar::Populate()
|
||||||
SetFont(wxFont(9, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
|
SetFont(wxFont(9, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
|
||||||
|
|
||||||
wxFlexGridSizer *mainSizer;
|
wxFlexGridSizer *mainSizer;
|
||||||
|
wxBoxSizer *hSizer;
|
||||||
|
|
||||||
/* we don't actually need a control yet, but we want to use it's methods
|
/* we don't actually need a control yet, but we want to use it's methods
|
||||||
* to do some look-ups, so we'll have to create one. We can't make the
|
* to do some look-ups, so we'll have to create one. We can't make the
|
||||||
|
@ -121,7 +122,8 @@ void SelectionBar::Populate()
|
||||||
* runtime */
|
* runtime */
|
||||||
wxString formatName = mListener ? mListener->AS_GetSelectionFormat() : wxString(wxEmptyString);
|
wxString formatName = mListener ? mListener->AS_GetSelectionFormat() : wxString(wxEmptyString);
|
||||||
|
|
||||||
Add((mainSizer = safenew wxFlexGridSizer(7, 1, 1)), 0, wxALIGN_CENTER_VERTICAL);
|
mainSizer = new wxFlexGridSizer(7, 1, 1);
|
||||||
|
Add(mainSizer, 0, wxALIGN_CENTER_VERTICAL);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Top row (mostly labels)
|
// Top row (mostly labels)
|
||||||
|
@ -148,8 +150,7 @@ void SelectionBar::Populate()
|
||||||
bool showSelectionLength = false;
|
bool showSelectionLength = false;
|
||||||
gPrefs->Read(wxT("/ShowSelectionLength"), &showSelectionLength);
|
gPrefs->Read(wxT("/ShowSelectionLength"), &showSelectionLength);
|
||||||
|
|
||||||
{
|
hSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
auto hSizer = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
|
|
||||||
mRightEndButton = safenew wxRadioButton(this, OnEndRadioID, _("End"),
|
mRightEndButton = safenew wxRadioButton(this, OnEndRadioID, _("End"),
|
||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
wxRB_GROUP);
|
wxRB_GROUP);
|
||||||
|
@ -174,8 +175,7 @@ void SelectionBar::Populate()
|
||||||
dummyButton->Disable();
|
dummyButton->Disable();
|
||||||
dummyButton->Hide();
|
dummyButton->Hide();
|
||||||
#endif
|
#endif
|
||||||
mainSizer->Add(hSizer.release(), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 0);
|
mainSizer->Add(hSizer, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 0);
|
||||||
}
|
|
||||||
|
|
||||||
mainSizer->Add(5, 1);
|
mainSizer->Add(5, 1);
|
||||||
|
|
||||||
|
|
|
@ -123,8 +123,8 @@ void SpectralSelectionBar::Populate()
|
||||||
? mListener->SSBL_GetBandwidthSelectionFormatName()
|
? mListener->SSBL_GetBandwidthSelectionFormatName()
|
||||||
: wxString(wxEmptyString);
|
: wxString(wxEmptyString);
|
||||||
|
|
||||||
wxFlexGridSizer *mainSizer;
|
wxFlexGridSizer *mainSizer = new wxFlexGridSizer(1, 1, 1);
|
||||||
Add((mainSizer = safenew wxFlexGridSizer(1, 1, 1)), 0, wxALIGN_CENTER_VERTICAL);
|
Add(mainSizer, 0, wxALIGN_CENTER_VERTICAL);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Top row, choice box
|
// Top row, choice box
|
||||||
|
@ -144,8 +144,7 @@ void SpectralSelectionBar::Populate()
|
||||||
// Bottom row, split into two columns, each with one control
|
// Bottom row, split into two columns, each with one control
|
||||||
//
|
//
|
||||||
|
|
||||||
{
|
wxBoxSizer *subSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
auto subSizer = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
|
|
||||||
|
|
||||||
mCenterCtrl = safenew NumericTextCtrl(
|
mCenterCtrl = safenew NumericTextCtrl(
|
||||||
NumericConverter::FREQUENCY, this, OnCenterID, frequencyFormatName, 0.0);
|
NumericConverter::FREQUENCY, this, OnCenterID, frequencyFormatName, 0.0);
|
||||||
|
@ -180,8 +179,7 @@ void SpectralSelectionBar::Populate()
|
||||||
mLowCtrl->Show(!mbCenterAndWidth);
|
mLowCtrl->Show(!mbCenterAndWidth);
|
||||||
mHighCtrl->Show(!mbCenterAndWidth);
|
mHighCtrl->Show(!mbCenterAndWidth);
|
||||||
|
|
||||||
mainSizer->Add(subSizer.release(), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 0);
|
mainSizer->Add(subSizer, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 0);
|
||||||
}
|
|
||||||
|
|
||||||
mainSizer->Layout();
|
mainSizer->Layout();
|
||||||
|
|
||||||
|
|
|
@ -430,7 +430,8 @@ void ToolBar::ReCreateButtons()
|
||||||
ms->Add( mGrabber, 0, wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP | wxRIGHT, 1 );
|
ms->Add( mGrabber, 0, wxEXPAND | wxALIGN_LEFT | wxALIGN_TOP | wxRIGHT, 1 );
|
||||||
|
|
||||||
// Use a box sizer for laying out controls
|
// Use a box sizer for laying out controls
|
||||||
ms->Add((mHSizer = safenew wxBoxSizer(wxHORIZONTAL)), 1, wxEXPAND);
|
mHSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
ms->Add( mHSizer, 1, wxEXPAND );
|
||||||
|
|
||||||
// (Re)Establish dock state
|
// (Re)Establish dock state
|
||||||
SetDocked( GetDock(), false );
|
SetDocked( GetDock(), false );
|
||||||
|
|
|
@ -120,9 +120,8 @@ class ToolFrame:public wxFrame
|
||||||
// Transfer the bar to the ferry
|
// Transfer the bar to the ferry
|
||||||
bar->Reparent( this );
|
bar->Reparent( this );
|
||||||
|
|
||||||
{
|
|
||||||
// We use a sizer to maintain proper spacing
|
// We use a sizer to maintain proper spacing
|
||||||
auto s = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
|
wxBoxSizer *s = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
// Add the bar to the sizer
|
// Add the bar to the sizer
|
||||||
s->Add( bar, 1, wxEXPAND | wxALL, border );
|
s->Add( bar, 1, wxEXPAND | wxALL, border );
|
||||||
|
@ -137,9 +136,7 @@ class ToolFrame:public wxFrame
|
||||||
SetSize( width + 2, bar->GetDockedSize().y + 2 );
|
SetSize( width + 2, bar->GetDockedSize().y + 2 );
|
||||||
|
|
||||||
// Attach the sizer and resize the window to fit
|
// Attach the sizer and resize the window to fit
|
||||||
SetSizer(s.release());
|
SetSizer( s );
|
||||||
}
|
|
||||||
|
|
||||||
Layout();
|
Layout();
|
||||||
|
|
||||||
// Inform toolbar of change
|
// Inform toolbar of change
|
||||||
|
|
|
@ -186,7 +186,8 @@ AButton * ToolsToolBar::MakeTool( teBmps eTool,
|
||||||
void ToolsToolBar::Populate()
|
void ToolsToolBar::Populate()
|
||||||
{
|
{
|
||||||
MakeButtonBackgroundsSmall();
|
MakeButtonBackgroundsSmall();
|
||||||
Add(mToolSizer = safenew wxGridSizer(2, 3, 1, 1));
|
mToolSizer = new wxGridSizer( 2, 3, 1, 1 );
|
||||||
|
Add( mToolSizer );
|
||||||
|
|
||||||
/* Tools */
|
/* Tools */
|
||||||
mTool[ selectTool ] = MakeTool( bmpIBeam, selectTool, _("Selection Tool") );
|
mTool[ selectTool ] = MakeTool( bmpIBeam, selectTool, _("Selection Tool") );
|
||||||
|
|
|
@ -109,10 +109,7 @@ ErrorDialog::ErrorDialog(
|
||||||
#if 0
|
#if 0
|
||||||
// Original non ShuttleGui based code.
|
// Original non ShuttleGui based code.
|
||||||
// Layout did not look good on Windows.
|
// Layout did not look good on Windows.
|
||||||
wxBoxSizer mainSizer;
|
wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
{
|
|
||||||
auto uMainSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
mainSizer = uMainSizer.get();
|
|
||||||
wxBoxSizer *vSizer = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer *vSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
||||||
wxBoxSizer *hSizer = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *hSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
@ -133,9 +130,7 @@ ErrorDialog::ErrorDialog(
|
||||||
mainSizer->Add(vSizer, 0, wxALL, 15 );
|
mainSizer->Add(vSizer, 0, wxALL, 15 );
|
||||||
|
|
||||||
SetAutoLayout(true);
|
SetAutoLayout(true);
|
||||||
SetSizer(uMainSizer.release());
|
SetSizer(mainSizer);
|
||||||
}
|
|
||||||
|
|
||||||
mainSizer->Fit(this);
|
mainSizer->Fit(this);
|
||||||
mainSizer->SetSizeHints(this);
|
mainSizer->SetSizeHints(this);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -68,16 +68,9 @@ MultiDialog::MultiDialog(wxWindow * pParent,
|
||||||
{
|
{
|
||||||
SetName(GetTitle());
|
SetName(GetTitle());
|
||||||
|
|
||||||
wxString *buttonLabels;
|
wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
wxBoxSizer *mainSizer;
|
wxBoxSizer *vSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
{
|
wxBoxSizer *iconAndTextSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
auto uMainSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
mainSizer = uMainSizer.get();
|
|
||||||
|
|
||||||
{
|
|
||||||
auto vSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
{
|
|
||||||
auto iconAndTextSizer = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
|
|
||||||
|
|
||||||
wxBitmap bitmap = wxArtProvider::GetIcon(wxART_WARNING,
|
wxBitmap bitmap = wxArtProvider::GetIcon(wxART_WARNING,
|
||||||
wxART_MESSAGE_BOX);
|
wxART_MESSAGE_BOX);
|
||||||
|
@ -88,13 +81,12 @@ MultiDialog::MultiDialog(wxWindow * pParent,
|
||||||
statText->SetName(message); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
|
statText->SetName(message); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
|
||||||
iconAndTextSizer->Add(statText, 1, wxCENTER|wxLEFT,15 );
|
iconAndTextSizer->Add(statText, 1, wxCENTER|wxLEFT,15 );
|
||||||
|
|
||||||
vSizer->Add(iconAndTextSizer.release(), 0, wxALIGN_LEFT | wxALL, 5);
|
vSizer->Add(iconAndTextSizer, 0, wxALIGN_LEFT|wxALL, 5);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int count=0;
|
int count=0;
|
||||||
while(buttons[count])count++;
|
while(buttons[count])count++;
|
||||||
buttonLabels = new wxString[count];
|
wxString *buttonLabels = new wxString[count];
|
||||||
|
|
||||||
count=0;
|
count=0;
|
||||||
while(buttons[count]){
|
while(buttons[count]){
|
||||||
|
@ -112,8 +104,7 @@ MultiDialog::MultiDialog(wxWindow * pParent,
|
||||||
vSizer->Add(mRadioBox, 1, wxEXPAND | wxALIGN_CENTER | wxALL, 5);
|
vSizer->Add(mRadioBox, 1, wxEXPAND | wxALIGN_CENTER | wxALL, 5);
|
||||||
|
|
||||||
|
|
||||||
{
|
wxBoxSizer* buttonSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
auto buttonSizer = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
|
|
||||||
|
|
||||||
wxButton* pButton;
|
wxButton* pButton;
|
||||||
if(log)
|
if(log)
|
||||||
|
@ -130,16 +121,12 @@ MultiDialog::MultiDialog(wxWindow * pParent,
|
||||||
pButton->SetDefault();
|
pButton->SetDefault();
|
||||||
buttonSizer->Add(pButton, 0, wxALIGN_RIGHT | wxALL, 5);
|
buttonSizer->Add(pButton, 0, wxALIGN_RIGHT | wxALL, 5);
|
||||||
|
|
||||||
vSizer->Add(buttonSizer.release(), 0, wxALIGN_CENTER | wxALL, 5);
|
vSizer->Add(buttonSizer, 0, wxALIGN_CENTER | wxALL, 5);
|
||||||
}
|
|
||||||
|
|
||||||
mainSizer->Add(vSizer.release(), 0, wxALL, 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
mainSizer->Add(vSizer, 0, wxALL, 5);
|
||||||
SetAutoLayout(true);
|
SetAutoLayout(true);
|
||||||
SetSizer(uMainSizer.release());
|
SetSizer(mainSizer);
|
||||||
}
|
|
||||||
|
|
||||||
mainSizer->Fit(this);
|
mainSizer->Fit(this);
|
||||||
mainSizer->SetSizeHints(this);
|
mainSizer->SetSizeHints(this);
|
||||||
delete[] buttonLabels;
|
delete[] buttonLabels;
|
||||||
|
|
|
@ -1087,15 +1087,13 @@ bool ProgressDialog::Create(const wxString & title,
|
||||||
}
|
}
|
||||||
SetName(GetTitle());
|
SetName(GetTitle());
|
||||||
|
|
||||||
|
wxBoxSizer *v;
|
||||||
wxWindow *w;
|
wxWindow *w;
|
||||||
wxSize ds;
|
wxSize ds;
|
||||||
|
|
||||||
SetExtraStyle(GetExtraStyle() | wxWS_EX_TRANSIENT);
|
SetExtraStyle(GetExtraStyle() | wxWS_EX_TRANSIENT);
|
||||||
|
|
||||||
wxFlexGridSizer *g;
|
v = new wxBoxSizer(wxVERTICAL);
|
||||||
wxBoxSizer *h;
|
|
||||||
{
|
|
||||||
auto v = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
|
||||||
|
|
||||||
mMessage = safenew wxStaticText(this,
|
mMessage = safenew wxStaticText(this,
|
||||||
wxID_ANY,
|
wxID_ANY,
|
||||||
|
@ -1122,9 +1120,7 @@ bool ProgressDialog::Create(const wxString & title,
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
{
|
wxFlexGridSizer *g = new wxFlexGridSizer(2, 2, 10, 10);
|
||||||
auto ug = std::make_unique<wxFlexGridSizer>(2, 2, 10, 10);
|
|
||||||
g = ug.get();
|
|
||||||
|
|
||||||
w = safenew wxStaticText(this,
|
w = safenew wxStaticText(this,
|
||||||
wxID_ANY,
|
wxID_ANY,
|
||||||
|
@ -1166,14 +1162,10 @@ bool ProgressDialog::Create(const wxString & title,
|
||||||
mRemaining->SetName(mRemaining->GetLabel()); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
|
mRemaining->SetName(mRemaining->GetLabel()); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
|
||||||
g->Add(mRemaining, 0, wxALIGN_LEFT);
|
g->Add(mRemaining, 0, wxALIGN_LEFT);
|
||||||
|
|
||||||
v->Add(ug.release(), 0, wxALIGN_CENTER | wxLEFT | wxRIGHT | wxBOTTOM, 10);
|
v->Add(g, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT | wxBOTTOM, 10);
|
||||||
}
|
|
||||||
|
|
||||||
ds.y += mRemaining->GetSize().y + 10;
|
ds.y += mRemaining->GetSize().y + 10;
|
||||||
|
|
||||||
{
|
wxBoxSizer *h = new wxBoxSizer(wxHORIZONTAL);
|
||||||
auto uh = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
|
|
||||||
h = uh.get();
|
|
||||||
|
|
||||||
if (!(flags & pdlgHideStopButton))
|
if (!(flags & pdlgHideStopButton))
|
||||||
{
|
{
|
||||||
|
@ -1187,11 +1179,9 @@ bool ProgressDialog::Create(const wxString & title,
|
||||||
h->Add(w, 0, wxRIGHT, 10);
|
h->Add(w, 0, wxRIGHT, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
v->Add(uh.release(), 0, wxALIGN_RIGHT | wxRIGHT | wxBOTTOM, 10);
|
v->Add(h, 0, wxALIGN_RIGHT | wxRIGHT | wxBOTTOM, 10);
|
||||||
}
|
|
||||||
|
|
||||||
SetSizer(v.release());
|
SetSizer(v);
|
||||||
}
|
|
||||||
Layout();
|
Layout();
|
||||||
|
|
||||||
ds.x = wxMax(g->GetSize().x, h->GetSize().x) + 10;
|
ds.x = wxMax(g->GetSize().x, h->GetSize().x) + 10;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user