diff --git a/src/ShuttleGui.cpp b/src/ShuttleGui.cpp index 937316c93..ca10f5ad3 100644 --- a/src/ShuttleGui.cpp +++ b/src/ShuttleGui.cpp @@ -255,7 +255,7 @@ void ShuttleGuiBase::AddPrompt(const wxString &Prompt) mpWind = safenew wxStaticText(GetParent(), -1, Prompt, wxDefaultPosition, wxDefaultSize, Style( wxALIGN_RIGHT )); mpWind->SetName(wxStripMenuCodes(Prompt)); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs) - UpdateSizersCore( false, wxALL | wxALIGN_CENTRE_VERTICAL ); + UpdateSizersCore( false, wxALL | wxALIGN_CENTRE_VERTICAL, true ); } /// Left aligned text string. @@ -2054,7 +2054,7 @@ void ShuttleGuiBase::SetProportions( int Default ) } -void ShuttleGuiBase::UpdateSizersCore(bool bPrepend, int Flags) +void ShuttleGuiBase::UpdateSizersCore(bool bPrepend, int Flags, bool prompt) { if( mpWind && mpParent ) { @@ -2068,6 +2068,13 @@ void ShuttleGuiBase::UpdateSizersCore(bool bPrepend, int Flags) mpSizer->Add(mpWind, miProp, Flags,miBorder); } } + + if (!prompt) { + // Apply certain optional window attributes here + + // Reset to defaults + mItem = {}; + } } if( mpSubSizer && mpSizer ) diff --git a/src/ShuttleGui.h b/src/ShuttleGui.h index f31f389c7..cd9d23922 100644 --- a/src/ShuttleGui.h +++ b/src/ShuttleGui.h @@ -119,6 +119,14 @@ private: T mDefaultValue; }; +namespace DialogDefinition { + +struct Item { + Item() = default; +}; + +} + class AUDACITY_DLL_API ShuttleGuiBase /* not final */ { public: @@ -344,7 +352,7 @@ protected: void PushSizer(); void PopSizer(); - void UpdateSizersCore( bool bPrepend, int Flags ); + void UpdateSizersCore( bool bPrepend, int Flags, bool prompt = false ); void UpdateSizers(); void UpdateSizersC(); void UpdateSizersAtStart(); @@ -412,6 +420,9 @@ private: wxString mRadioValueString; /// Unwrapped string value. wxRadioButton * DoAddRadioButton( const wxString &Prompt, int style, int selector, int initValue); + +protected: + DialogDefinition::Item mItem; }; // A rarely used helper function that sets a pointer