mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-05 14:18:53 +02:00
ExportMixerDialog uses ShuttleGui
This commit is contained in:
parent
ab2e50102d
commit
bed7b41af9
@ -1410,43 +1410,46 @@ ExportMixerDialog::ExportMixerDialog( const TrackList *tracks, bool selectedOnly
|
||||
maxNumChannels = 32;
|
||||
|
||||
mMixerSpec = std::make_unique<MixerSpec>(numTracks, maxNumChannels);
|
||||
|
||||
wxBoxSizer *vertSizer;
|
||||
|
||||
auto label = XO("Output Channels: %2d")
|
||||
.Format( mMixerSpec->GetNumChannels() );
|
||||
|
||||
ShuttleGui S{ this, eIsCreating };
|
||||
{
|
||||
auto uVertSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
||||
vertSizer = uVertSizer.get();
|
||||
S.SetBorder( 5 );
|
||||
|
||||
wxWindow *mixerPanel = safenew ExportMixerPanel(this, ID_MIXERPANEL,
|
||||
mMixerSpec.get(), mTrackNames,
|
||||
wxDefaultPosition, wxSize(400, -1));
|
||||
mixerPanel->SetName(_("Mixer Panel"));
|
||||
vertSizer->Add(mixerPanel, 1, wxEXPAND | wxALL, 5);
|
||||
auto mixerPanel = safenew ExportMixerPanel(
|
||||
S.GetParent(), ID_MIXERPANEL, mMixerSpec.get(),
|
||||
mTrackNames, wxDefaultPosition, wxSize(400, -1));
|
||||
S.Prop(1)
|
||||
.Name(XO("Mixer Panel"))
|
||||
.Position(wxEXPAND | wxALL)
|
||||
.AddWindow(mixerPanel);
|
||||
|
||||
S.StartHorizontalLay(wxALIGN_CENTRE | wxALL, 0);
|
||||
{
|
||||
auto horSizer = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
|
||||
mChannelsText = S.AddVariableText(
|
||||
label.Translation(),
|
||||
false, wxALIGN_LEFT | wxALL );
|
||||
|
||||
wxString label;
|
||||
label.Printf(_("Output Channels: %2d"), mMixerSpec->GetNumChannels());
|
||||
mChannelsText = safenew wxStaticText(this, -1, label);
|
||||
horSizer->Add(mChannelsText, 0, wxALIGN_LEFT | wxALL, 5);
|
||||
|
||||
wxSlider *channels = safenew wxSliderWrapper(this, ID_SLIDER_CHANNEL,
|
||||
mMixerSpec->GetNumChannels(), 1, mMixerSpec->GetMaxNumChannels(),
|
||||
wxDefaultPosition, wxSize(300, -1));
|
||||
channels->SetName(label);
|
||||
horSizer->Add(channels, 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
vertSizer->Add(horSizer.release(), 0, wxALIGN_CENTRE | wxALL, 5);
|
||||
S
|
||||
.Id(ID_SLIDER_CHANNEL)
|
||||
.Name(label)
|
||||
.Size({300, -1})
|
||||
.Style(wxSL_HORIZONTAL)
|
||||
.Position(wxEXPAND | wxALL)
|
||||
.AddSlider( {},
|
||||
mMixerSpec->GetNumChannels(),
|
||||
mMixerSpec->GetMaxNumChannels(), 1 );
|
||||
}
|
||||
S.EndHorizontalLay();
|
||||
|
||||
vertSizer->Add(CreateStdButtonSizer(this, eCancelButton | eOkButton | eHelpButton).release(), 0, wxEXPAND);
|
||||
|
||||
SetAutoLayout(true);
|
||||
SetSizer(uVertSizer.release());
|
||||
S.AddStandardButtons( eCancelButton | eOkButton | eHelpButton );
|
||||
}
|
||||
|
||||
vertSizer->Fit( this );
|
||||
vertSizer->SetSizeHints( this );
|
||||
SetAutoLayout(true);
|
||||
GetSizer()->Fit( this );
|
||||
GetSizer()->SetSizeHints( this );
|
||||
|
||||
SetSizeHints( 640, 480, 20000, 20000 );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user