Just simplify wxPoint/wxSize creation from wxRect

Use the existing wxRect::Get{Position,Size}() methods instead of explicitly
creating the objects from the wxRect components, this is simpler and more
readable.

No real changes.
This commit is contained in:
Vadim Zeitlin
2015-11-25 21:54:54 +01:00
parent 4edae7238a
commit f9d907a1d4

View File

@@ -120,8 +120,8 @@ wxDataViewColumn* GetExpanderColumnOrFirstOne(wxDataViewCtrl* dataview)
wxTextCtrl *CreateEditorTextCtrl(wxWindow *parent, const wxRect& labelRect, const wxString& value) wxTextCtrl *CreateEditorTextCtrl(wxWindow *parent, const wxRect& labelRect, const wxString& value)
{ {
wxTextCtrl* ctrl = new wxTextCtrl(parent, wxID_ANY, value, wxTextCtrl* ctrl = new wxTextCtrl(parent, wxID_ANY, value,
wxPoint(labelRect.x,labelRect.y), labelRect.GetPosition(),
wxSize(labelRect.width,labelRect.height), labelRect.GetSize(),
wxTE_PROCESS_ENTER); wxTE_PROCESS_ENTER);
// Adjust size of wxTextCtrl editor to fit text, even if it means being // Adjust size of wxTextCtrl editor to fit text, even if it means being