remove/replace redundant SetAutoLayout() and Fit() calls, leave just SetSizer[AndFit]() ones (patch 1905759)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
adcb6f88ee
commit
92c01615ec
@ -162,8 +162,7 @@ wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
|
||||
ok->SetDefault();
|
||||
sizer->Add(ok, 0, wxALIGN_RIGHT | wxALL, 10);
|
||||
|
||||
SetSizer(sizer);
|
||||
sizer->Fit(this);
|
||||
SetSizerAndFit(sizer);
|
||||
|
||||
choice->SetSelection(6/*wxART_MESSAGE_BOX*/);
|
||||
SetArtClient(wxART_MESSAGE_BOX);
|
||||
|
@ -1015,7 +1015,6 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
||||
|
||||
// sizer
|
||||
panel = new wxPanel(m_book);
|
||||
panel->SetAutoLayout( true );
|
||||
|
||||
wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
@ -313,7 +313,6 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
|
||||
wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizer->Add(m_book, 1, wxEXPAND);
|
||||
panel->SetSizer(sizer);
|
||||
sizer->Fit(this);
|
||||
sizer->SetSizeHints(this);
|
||||
}
|
||||
|
||||
|
@ -1624,8 +1624,7 @@ DnDShapeDialog::DnDShapeDialog(wxFrame *parent, DnDShape *shape)
|
||||
buttonSizer->Add( bt, 0, wxALL, 2 );
|
||||
topSizer->Add( buttonSizer, 0, wxALL|wxALIGN_RIGHT, 2 );
|
||||
|
||||
SetSizer( topSizer );
|
||||
topSizer->Fit( this );
|
||||
SetSizerAndFit( topSizer );
|
||||
}
|
||||
|
||||
DnDShape *DnDShapeDialog::GetShape() const
|
||||
|
@ -48,8 +48,7 @@ bool MyApp::OnInit()
|
||||
sizer->Add(5,5);
|
||||
|
||||
sizer->Add(new wxButton(&dlg, wxID_OK, _("OK")), 0, wxALIGN_RIGHT | wxALL, 10);
|
||||
dlg.SetSizer(sizer);
|
||||
sizer->Fit(&dlg);
|
||||
dlg.SetSizerAndFit(sizer);
|
||||
dlg.Centre();
|
||||
|
||||
dlg.ShowModal();
|
||||
|
@ -475,8 +475,7 @@ MyDialog::MyDialog(wxFrame *parent)
|
||||
sizerTop->Add(new wxButton(this, wxID_CANCEL, _T("&Cancel")),
|
||||
0, wxCENTRE | wxALL, 5);
|
||||
|
||||
SetSizer(sizerTop);
|
||||
sizerTop->Fit(this);
|
||||
SetSizerAndFit(sizerTop);
|
||||
}
|
||||
|
||||
void MyDialog::OnThrowInt(wxCommandEvent& WXUNUSED(event))
|
||||
|
@ -371,10 +371,7 @@ GridFrame::GridFrame()
|
||||
wxEXPAND );
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
SetAutoLayout(true);
|
||||
SetSizer( topSizer );
|
||||
|
||||
topSizer->Fit( this );
|
||||
SetSizerAndFit( topSizer );
|
||||
|
||||
Centre();
|
||||
SetDefaults();
|
||||
|
@ -711,10 +711,7 @@ MyModalDialog::MyModalDialog(wxWindow *parent)
|
||||
sizerTop->Add(text, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
sizerTop->Add(sizerRow, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
SetSizer(sizerTop);
|
||||
|
||||
sizerTop->SetSizeHints(this);
|
||||
sizerTop->Fit(this);
|
||||
SetSizerAndFit(sizerTop);
|
||||
|
||||
btnOK->SetFocus();
|
||||
btnOK->SetDefault();
|
||||
|
@ -426,12 +426,10 @@ MySizerDialog::MySizerDialog(wxWindow *parent, const wxString &title)
|
||||
wxButton *button2 = new wxButton( panel, wxID_ANY, _T("Hallo") );
|
||||
panelsizer->Add( button2, 0, wxALIGN_RIGHT | wxLEFT|wxRIGHT|wxBOTTOM, 30 );
|
||||
|
||||
panel->SetAutoLayout( true );
|
||||
panel->SetSizer( panelsizer );
|
||||
|
||||
// Tell dialog to use sizer
|
||||
SetSizer( topsizer );
|
||||
topsizer->SetSizeHints( this );
|
||||
SetSizerAndFit( topsizer );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -662,11 +660,7 @@ MyNestedSizerFrame::MyNestedSizerFrame(const wxString &title, int x, int y )
|
||||
m_target = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80, wxDefaultCoord ) );
|
||||
main_sizer->Add( m_target, 1, wxALL|wxGROW, 5 );
|
||||
|
||||
SetSizer( main_sizer);
|
||||
|
||||
Layout();
|
||||
GetSizer()->Fit( this );
|
||||
GetSizer()->SetSizeHints( this );
|
||||
SetSizerAndFit( main_sizer);
|
||||
}
|
||||
|
||||
|
||||
@ -708,8 +702,6 @@ MyWrapSizerFrame::MyWrapSizerFrame(const wxString &title, int x, int y )
|
||||
root->Add( ps_bottom, 1, wxEXPAND | wxALL, 5 );
|
||||
|
||||
// Set sizer for window
|
||||
SetSizer( root );
|
||||
root->Fit( this );
|
||||
root->SetSizeHints( this );
|
||||
SetSizerAndFit( root );
|
||||
}
|
||||
|
||||
|
@ -1534,7 +1534,6 @@ wxMediaPlayerNotebookPage::wxMediaPlayerNotebookPage(wxMediaPlayerFrame* parentF
|
||||
//
|
||||
wxFlexGridSizer* sizer = new wxFlexGridSizer(2, 1, 0, 0);
|
||||
this->SetSizer(sizer);
|
||||
this->SetAutoLayout(true);
|
||||
sizer->AddGrowableRow(0);
|
||||
sizer->AddGrowableCol(0);
|
||||
|
||||
|
@ -332,7 +332,6 @@ MyFrame::MyFrame()
|
||||
|
||||
m_panel->SetSizer(m_sizerFrame);
|
||||
|
||||
m_sizerFrame->Fit(this);
|
||||
m_sizerFrame->SetSizeHints(this);
|
||||
|
||||
Centre(wxBOTH);
|
||||
|
@ -142,7 +142,6 @@ SimpleTransientPopup::SimpleTransientPopup( wxWindow *parent )
|
||||
topSizer->Add( m_spinCtrl, 0, wxALL, 5 );
|
||||
topSizer->Add( m_mouseText, 0, wxCENTRE|wxALL, 5 );
|
||||
|
||||
m_panel->SetAutoLayout( true );
|
||||
m_panel->SetSizer( topSizer );
|
||||
topSizer->Fit(m_panel);
|
||||
topSizer->Fit(this);
|
||||
@ -365,7 +364,6 @@ MyFrame::MyFrame(const wxString& title)
|
||||
topSizer->Add( button2, 0, wxALL, 5 );
|
||||
topSizer->Add( m_logWin, 1, wxEXPAND|wxALL, 5 );
|
||||
|
||||
panel->SetAutoLayout( true );
|
||||
panel->SetSizer( topSizer );
|
||||
|
||||
}
|
||||
@ -452,9 +450,7 @@ MyDialog::MyDialog(const wxString& title)
|
||||
topSizer->AddSpacer(40);
|
||||
topSizer->Add( okButton, 0, wxALL, 5 );
|
||||
|
||||
panel->SetAutoLayout( true );
|
||||
panel->SetSizer( topSizer );
|
||||
topSizer->Fit(this);
|
||||
panel->SetSizerAndFit( topSizer );
|
||||
}
|
||||
|
||||
void MyDialog::OnStartSimplePopup(wxCommandEvent& event)
|
||||
|
@ -174,7 +174,6 @@ MyScrolledWindow::MyScrolledWindow( wxWindow *parent, wxWindowID id,
|
||||
|
||||
mainsizer->Add( middlesizer, 1, wxEXPAND );
|
||||
|
||||
SetAutoLayout( true );
|
||||
SetSizer( mainsizer );
|
||||
}
|
||||
|
||||
@ -421,7 +420,6 @@ MyFrame::MyFrame()
|
||||
topsizer->Add( m_log, 0, wxEXPAND );
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
SetAutoLayout( true );
|
||||
SetSizer( topsizer );
|
||||
}
|
||||
|
||||
|
@ -576,10 +576,7 @@ MyAboutDialog::MyAboutDialog(wxWindow *parent)
|
||||
sizerTop->Add(-1, 10, 1, wxGROW);
|
||||
sizerTop->Add(statbarBottom, 0, wxGROW);
|
||||
|
||||
SetSizer(sizerTop);
|
||||
|
||||
sizerTop->Fit(this);
|
||||
sizerTop->SetSizeHints(this);
|
||||
SetSizerAndFit(sizerTop);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -1145,7 +1145,6 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
||||
topSizer->Add( m_log, 1, wxALL | wxEXPAND, 10 );
|
||||
#endif
|
||||
|
||||
SetAutoLayout( true );
|
||||
SetSizer(topSizer);
|
||||
}
|
||||
|
||||
|
@ -448,7 +448,6 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
|
||||
|
||||
m_panel->SetSizer(sizerTop);
|
||||
|
||||
sizerTop->Fit(this);
|
||||
sizerTop->SetSizeHints(this);
|
||||
|
||||
#if USE_LOG && !defined(__WXCOCOA__)
|
||||
|
@ -146,8 +146,7 @@ public:
|
||||
wxALL,
|
||||
5 // Border
|
||||
);
|
||||
SetSizer(mainSizer);
|
||||
mainSizer->Fit(this);
|
||||
SetSizerAndFit(mainSizer);
|
||||
}
|
||||
|
||||
virtual bool TransferDataFromWindow()
|
||||
@ -204,8 +203,7 @@ public:
|
||||
5 // Border
|
||||
);
|
||||
|
||||
SetSizer(mainSizer);
|
||||
mainSizer->Fit(this);
|
||||
SetSizerAndFit(mainSizer);
|
||||
}
|
||||
|
||||
// wizard event handlers
|
||||
@ -314,8 +312,7 @@ public:
|
||||
wxTextCtrl* textCtrl = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, textSize, wxTE_MULTILINE);
|
||||
mainSizer->Add(textCtrl, 0, wxALL|wxEXPAND, 5);
|
||||
|
||||
SetSizer(mainSizer);
|
||||
mainSizer->Fit(this);
|
||||
SetSizerAndFit(mainSizer);
|
||||
}
|
||||
|
||||
// implement wxWizardPage functions
|
||||
|
Loading…
Reference in New Issue
Block a user