Remove unnecessary wxSizer::Fit() calls
wxSizer::SetSizeHints() already does what Fit() does (while also setting the minimum window size to the fitting size), so there is no need to call both of them. No real changes, just some cleanup.
This commit is contained in:
@@ -372,7 +372,6 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
|
||||
SetSizer( topsizer );
|
||||
|
||||
topsizer->SetSizeHints( this );
|
||||
topsizer->Fit( this );
|
||||
|
||||
if ( styleDlg & wxCENTRE )
|
||||
Centre(wxBOTH);
|
||||
|
||||
@@ -395,7 +395,6 @@ void wxGenericColourDialog::CreateWidgets()
|
||||
SetSizer( topSizer );
|
||||
|
||||
topSizer->SetSizeHints( this );
|
||||
topSizer->Fit( this );
|
||||
|
||||
Centre( wxBOTH );
|
||||
}
|
||||
|
||||
@@ -160,7 +160,6 @@ bool wxGenericDirDialog::Create(wxWindow* parent,
|
||||
SetSizer( topsizer );
|
||||
|
||||
topsizer->SetSizeHints( this );
|
||||
topsizer->Fit( this );
|
||||
|
||||
Centre( wxBOTH );
|
||||
|
||||
|
||||
@@ -207,7 +207,6 @@ bool wxGenericFindReplaceDialog::Create(wxWindow *parent,
|
||||
SetSizer( topsizer );
|
||||
|
||||
topsizer->SetSizeHints( this );
|
||||
topsizer->Fit( this );
|
||||
|
||||
Centre( wxBOTH );
|
||||
|
||||
|
||||
@@ -513,7 +513,6 @@ void wxGenericFontDialog::CreateWidgets()
|
||||
|
||||
GetSizer()->SetItemMinSize(m_previewer, is_pda ? 100 : 430, is_pda ? 40 : 100);
|
||||
GetSizer()->SetSizeHints(this);
|
||||
GetSizer()->Fit(this);
|
||||
|
||||
Centre(wxBOTH);
|
||||
|
||||
|
||||
@@ -220,7 +220,6 @@ void wxGenericMessageDialog::DoCreateMsgdialog()
|
||||
SetSizer( topsizer );
|
||||
|
||||
topsizer->SetSizeHints( this );
|
||||
topsizer->Fit( this );
|
||||
wxSize size( GetSize() );
|
||||
if (size.x < size.y*3/2)
|
||||
{
|
||||
|
||||
@@ -123,7 +123,6 @@ bool wxNumberEntryDialog::Create(wxWindow *parent,
|
||||
SetSizer( topsizer );
|
||||
|
||||
topsizer->SetSizeHints( this );
|
||||
topsizer->Fit( this );
|
||||
|
||||
Centre( wxBOTH );
|
||||
|
||||
|
||||
@@ -88,7 +88,6 @@ void wxPropertySheetDialog::Init()
|
||||
// Layout the dialog, to be called after pages have been created
|
||||
void wxPropertySheetDialog::LayoutDialog(int centreFlags)
|
||||
{
|
||||
GetSizer()->Fit(this);
|
||||
GetSizer()->SetSizeHints(this);
|
||||
if (centreFlags)
|
||||
Centre(centreFlags);
|
||||
|
||||
@@ -114,7 +114,6 @@ bool wxTextEntryDialog::Create(wxWindow *parent,
|
||||
SetSizer( topsizer );
|
||||
|
||||
topsizer->SetSizeHints( this );
|
||||
topsizer->Fit( this );
|
||||
|
||||
if ( style & wxCENTRE )
|
||||
Centre( wxBOTH );
|
||||
|
||||
@@ -272,7 +272,6 @@ wxTipDialog::wxTipDialog(wxWindow *parent,
|
||||
SetSizer( topsizer );
|
||||
|
||||
topsizer->SetSizeHints( this );
|
||||
topsizer->Fit( this );
|
||||
|
||||
Centre(wxBOTH | wxCENTER_FRAME);
|
||||
}
|
||||
|
||||
@@ -297,7 +297,6 @@ bool wxFontDialog::Create(wxWindow* parent, const wxFontData& fontData)
|
||||
wxDialog::Create( parent, wxID_ANY, caption, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
|
||||
CreateControls();
|
||||
GetSizer()->Fit(this);
|
||||
GetSizer()->SetSizeHints(this);
|
||||
Centre();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user