mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-04 22:49:07 +02:00
Import Stream dialog uses ShuttleGui
This commit is contained in:
parent
3a14393f5e
commit
5bfd44d81f
@ -752,26 +752,25 @@ wxDialogWrapper( 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;
|
ShuttleGui S{ this, eIsCreating };
|
||||||
{
|
{
|
||||||
auto uVertSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
S.SetBorder( 5 );
|
||||||
vertSizer = uVertSizer.get();
|
|
||||||
|
|
||||||
const auto choices = transform_container<wxArrayStringEx>(
|
StreamList = S
|
||||||
|
.Style(wxLB_EXTENDED | wxLB_ALWAYS_SB)
|
||||||
|
.AddListBox(
|
||||||
|
transform_container<wxArrayStringEx>(
|
||||||
mFile->GetStreamInfo(),
|
mFile->GetStreamInfo(),
|
||||||
std::mem_fn( &TranslatableString::Translation ) );
|
std::mem_fn( &TranslatableString::Translation ) ) );
|
||||||
StreamList = safenew wxListBox(this, -1, wxDefaultPosition, wxDefaultSize, choices, wxLB_EXTENDED | wxLB_ALWAYS_SB);
|
|
||||||
|
|
||||||
vertSizer->Add(StreamList, 1, wxEXPAND | wxALIGN_LEFT | wxALL, 5);
|
S.Prop(1)
|
||||||
|
.Position(wxEXPAND | wxALIGN_LEFT | wxALL)
|
||||||
vertSizer->Add(CreateStdButtonSizer(this, eCancelButton | eOkButton).release(), 0, wxEXPAND);
|
.AddWindow(StreamList);
|
||||||
|
S.AddStandardButtons();
|
||||||
SetAutoLayout(true);
|
|
||||||
|
|
||||||
SetSizer(uVertSizer.release());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vertSizer->Fit( this );
|
SetAutoLayout(true);
|
||||||
|
GetSizer()->Fit( this );
|
||||||
|
|
||||||
SetSize( 400, 200 );
|
SetSize( 400, 200 );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user