X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a00b2d0a6372f4e71cbf6f58058ce040e302a759..9950649c8d898552ef0a046e5301eb4a5f836680:/src/gtk/button.cpp diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index bc4dff9768..4638f0a6b1 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -135,19 +135,7 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label, m_parent->DoAddChild( this ); - PostCreation(); - InheritAttributes(); - - wxSize best_size( DoGetBestSize() ); - wxSize new_size( size ); - if (new_size.x == -1) - new_size.x = best_size.x; - if (new_size.y == -1) - new_size.y = best_size.y; - if ((new_size.x != size.x) || (new_size.y != size.y)) - SetSize( new_size.x, new_size.y ); - - SetSize( new_size ); + PostCreation(size); return TRUE; } @@ -244,5 +232,12 @@ wxSize wxButton::DoGetBestSize() const return ret; } +// static +wxVisualAttributes +wxButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) +{ + return GetDefaultAttributesFromGTKWidget(gtk_button_new); +} + #endif // wxUSE_BUTTON