mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-02 08:59:28 +02:00
Nyquist output dialog uses ShuttleGui
This commit is contained in:
parent
093ffbd2f1
commit
de4edb0424
@ -3193,42 +3193,34 @@ NyquistOutputDialog::NyquistOutputDialog(wxWindow * parent, wxWindowID id,
|
|||||||
{
|
{
|
||||||
SetName();
|
SetName();
|
||||||
|
|
||||||
wxBoxSizer *mainSizer;
|
ShuttleGui S{ this, eIsCreating };
|
||||||
{
|
{
|
||||||
auto uMainSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
|
S.SetBorder(10);
|
||||||
mainSizer = uMainSizer.get();
|
|
||||||
wxButton *button;
|
|
||||||
wxControl *item;
|
|
||||||
|
|
||||||
const auto translated = prompt.Translation();
|
S.AddVariableText( prompt, false, wxALIGN_LEFT | wxLEFT | wxTOP | wxRIGHT );
|
||||||
item = safenew wxStaticText(this, -1, translated);
|
|
||||||
item->SetName(translated); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
|
|
||||||
mainSizer->Add(item, 0, wxALIGN_LEFT | wxLEFT | wxTOP | wxRIGHT, 10);
|
|
||||||
|
|
||||||
// TODO: use ShowInfoDialog() instead.
|
// TODO: use ShowInfoDialog() instead.
|
||||||
// Beware this dialog MUST work with screen readers.
|
// Beware this dialog MUST work with screen readers.
|
||||||
item = safenew wxTextCtrl(this, -1, message.Translation(),
|
S.Prop( 1 )
|
||||||
wxDefaultPosition, wxSize(480, 250),
|
.Position(wxEXPAND | wxALL)
|
||||||
wxTE_MULTILINE | wxTE_READONLY);
|
.MinSize( { 480, 250 } )
|
||||||
mainSizer->Add(item, 1, wxEXPAND | wxALL, 10);
|
.Style(wxTE_MULTILINE | wxTE_READONLY)
|
||||||
|
.AddTextWindow( message.Translation() );
|
||||||
|
|
||||||
|
S.SetBorder( 5 );
|
||||||
|
|
||||||
|
S.StartHorizontalLay(wxALIGN_CENTRE | wxLEFT | wxBOTTOM | wxRIGHT, 0 );
|
||||||
{
|
{
|
||||||
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"));
|
S.Id(wxID_OK).AddButton( XO("OK"), wxALIGN_CENTRE, true );
|
||||||
button->SetDefault();
|
}
|
||||||
hSizer->Add(button, 0, wxALIGN_CENTRE | wxALL, 5);
|
S.EndHorizontalLay();
|
||||||
|
|
||||||
mainSizer->Add(hSizer.release(), 0, wxALIGN_CENTRE | wxLEFT | wxBOTTOM | wxRIGHT, 5);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SetAutoLayout(true);
|
SetAutoLayout(true);
|
||||||
SetSizer(uMainSizer.release());
|
GetSizer()->Fit(this);
|
||||||
}
|
GetSizer()->SetSizeHints(this);
|
||||||
|
|
||||||
mainSizer->Fit(this);
|
|
||||||
mainSizer->SetSizeHints(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user