X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..785f5eaa05195f5e44a974861864324667a3326e:/src/gtk1/button.cpp diff --git a/src/gtk1/button.cpp b/src/gtk1/button.cpp index 51caf3b9dc..a3f1123908 100644 --- a/src/gtk1/button.cpp +++ b/src/gtk1/button.cpp @@ -136,8 +136,7 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label, m_parent->DoAddChild( this ); PostCreation(); - - SetFont( parent->GetFont() ); + InheritAttributes(); wxSize best_size( DoGetBestSize() ); wxSize new_size( size ); @@ -150,9 +149,6 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label, SetSize( new_size ); - SetBackgroundColour( parent->GetBackgroundColour() ); - SetForegroundColour( parent->GetForegroundColour() ); - Show( TRUE ); return TRUE; @@ -216,6 +212,10 @@ wxSize wxButton::DoGetBestSize() const { wxSize ret( wxControl::DoGetBestSize() ); +#ifndef __WXGTK20__ + ret.x += 10; // add a few pixels for sloppy (but common) themes +#endif + if (!HasFlag(wxBU_EXACTFIT)) { if (ret.x < 80) ret.x = 80;