X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3417c2cd3d5cb05451270b5a09fe2355406158a3..07d4b94c3b5d8876d3c9a5f93048afdd6734fe78:/src/gtk/button.cpp diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index e109966054..2bb626f031 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -97,8 +97,17 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label, GetTextExtent( m_label, &x, &y, (int*)NULL, (int*)NULL, &new_font ); wxSize newSize = size; - if (newSize.x == -1) newSize.x = 12+x; - if (newSize.y == -1) newSize.y = 11+y; + if (newSize.x == -1) + { + newSize.x = 12+x; + if (newSize.x < 80) newSize.x = 80; + } + if (newSize.y == -1) + { + newSize.y = 11+y; + if (newSize.x < 26) newSize.x = 26; + } + SetSize( newSize.x, newSize.y ); gtk_signal_connect( GTK_OBJECT(m_widget), "clicked",