X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/26bf1ce0bc3061bf7b1f237f2e0c62101cdef218..929eed47994d715f3ffccbdf47768a13171da968:/src/gtk/textctrl.cpp diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index fd5d34bc58..3fc3e5386c 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -182,10 +182,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value, m_text = gtk_entry_new(); } - wxSize newSize = size; - if (newSize.x == -1) newSize.x = 80; - if (newSize.y == -1) newSize.y = 26; - SetSize( newSize.x, newSize.y ); + SetSizeOrDefault( size ); m_parent->DoAddChild( this ); @@ -966,3 +963,9 @@ void wxTextCtrl::OnInternalIdle() UpdateWindowUI(); } + +wxSize wxTextCtrl::DoGetBestSize() const +{ + // FIXME should be different for multi-line controls... + return wxSize(80, 26); +}