1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-19 17:40:51 +02:00

Comments about wxALL where there are position arguments in ShuttleGui

This commit is contained in:
Paul Licameli 2018-01-28 16:51:04 -05:00
parent 1cd795aadb
commit 6bff718248
2 changed files with 8 additions and 0 deletions

View File

@ -1061,6 +1061,7 @@ void ShuttleGuiBase::StartHorizontalLay( int PositionFlags, int iProp)
return;
miSizerProp=iProp;
mpSubSizer = std::make_unique<wxBoxSizer>( wxHORIZONTAL );
// PRL: wxALL has no effect because UpdateSizersCore ignores border
UpdateSizersCore( false, PositionFlags | wxALL );
}
@ -1086,6 +1087,7 @@ void ShuttleGuiBase::StartVerticalLay(int PositionFlags, int iProp)
return;
miSizerProp=iProp;
mpSubSizer = std::make_unique<wxBoxSizer>( wxVERTICAL );
// PRL: wxALL has no effect because UpdateSizersCore ignores border
UpdateSizersCore( false, PositionFlags | wxALL );
}
@ -1101,6 +1103,7 @@ void ShuttleGuiBase::StartMultiColumn(int nCols, int PositionFlags)
if( mShuttleMode != eIsCreating )
return;
mpSubSizer = std::make_unique<wxFlexGridSizer>( nCols );
// PRL: wxALL has no effect because UpdateSizersCore ignores border
UpdateSizersCore( false, PositionFlags | wxALL );
}

View File

@ -131,6 +131,7 @@ public:
void AddPrompt(const wxString &Prompt);
void AddUnits(const wxString &Prompt);
void AddTitle(const wxString &Prompt);
// Applies wxALL (which affects borders) only when in Flags:
wxWindow * AddWindow(wxWindow * pWindow, int Flags = wxALIGN_CENTRE | wxALL );
wxSlider * AddSlider(const wxString &Prompt, int pos, int Max, int Min = 0);
wxSlider * AddVSlider(const wxString &Prompt, int pos, int Max);
@ -138,8 +139,12 @@ public:
wxTreeCtrl * AddTree();
wxRadioButton * AddRadioButton( const wxString & Prompt );
wxRadioButton * AddRadioButtonToGroup( const wxString & Prompt);
// Always ORs the flags with wxALL (which affects borders):
wxButton * AddButton( const wxString & Text, int PositionFlags = wxALIGN_CENTRE );
// Always ORs the flags with wxALL (which affects borders):
wxBitmapButton * AddBitmapButton(const wxBitmap &Bitmap, int PositionFlags = wxALIGN_CENTRE);
// When PositionFlags is 0, applies wxALL (which affects borders),
// and either wxALIGN_CENTER (if bCenter) or else wxEXPAND
wxStaticText * AddVariableText(const wxString &Str, bool bCenter = false, int PositionFlags = 0);
wxTextCtrl * AddTextBox(const wxString &Caption, const wxString &Value, const int nChars);
wxTextCtrl * AddNumericTextBox(const wxString &Caption, const wxString &Value, const int nChars);