X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8487f8874288a8e4fe40ead153c73dfc7777f41b..fb10f04c957b3712c04ddec92d083209e127b011:/src/gtk1/textctrl.cpp diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp index ec0d15875c..3fc3e5386c 100644 --- a/src/gtk1/textctrl.cpp +++ b/src/gtk1/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 ); @@ -963,4 +960,12 @@ void wxTextCtrl::OnInternalIdle() if ((window) && !(GTK_WIDGET_NO_WINDOW(m_widget))) gdk_window_set_cursor( window, cursor.GetCursor() ); } + + UpdateWindowUI(); +} + +wxSize wxTextCtrl::DoGetBestSize() const +{ + // FIXME should be different for multi-line controls... + return wxSize(80, 26); }