X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/071a2d78147df569d57b1ef138ab126a586b594d..08f6ac314ae712e2bc8fa59cf688e6bcff76181f:/src/gtk1/combobox.cpp diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index 32b082064a..3f8b535c07 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -101,7 +101,15 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, m_needParent = TRUE; m_acceptsFocus = TRUE; - if (!PreCreation( parent, pos, size ) || + wxSize newSize( size ); + if (newSize.x == -1) + newSize.x = 80; + if (newSize.y == -1) + newSize.y = 26; + if (newSize.y > 30) + newSize.y = 30; + + if (!PreCreation( parent, pos, newSize ) || !CreateBase( parent, id, pos, size, style, validator, name )) { wxFAIL_MSG( wxT("wxComboBox creation failed") ); @@ -113,8 +121,6 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, // make it more useable gtk_combo_set_use_arrows_always(GTK_COMBO(m_widget), TRUE); - SetSizeOrDefault( size ); - GtkWidget *list = GTK_COMBO(m_widget)->list; for (int i = 0; i < n; i++)