X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e39af974ef7846e26686ae39d74e4696c1fef0c3..b77b87881bae2e6306366d79e7fe160334b3d4a2:/src/gtk/tglbtn.cpp diff --git a/src/gtk/tglbtn.cpp b/src/gtk/tglbtn.cpp index f103789376..d6f4d5881f 100644 --- a/src/gtk/tglbtn.cpp +++ b/src/gtk/tglbtn.cpp @@ -10,6 +10,9 @@ // License: Rocketeer license ///////////////////////////////////////////////////////////////////////////// +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #include "wx/tglbtn.h" #include "wx/button.h" @@ -72,8 +75,7 @@ bool wxToggleButton::Create(wxWindow *parent, wxWindowID id, m_parent->DoAddChild(this); PostCreation(); - - SetFont(parent->GetFont()); + InheritAttributes(); wxSize size_best(DoGetBestSize()); wxSize new_size(size); @@ -84,9 +86,6 @@ bool wxToggleButton::Create(wxWindow *parent, wxWindowID id, if ((new_size.x != size.x) || (new_size.y != size.y)) SetSize(new_size.x, new_size.y); - SetBackgroundColour(parent->GetBackgroundColour()); - SetForegroundColour(parent->GetForegroundColour()); - Show(TRUE); return TRUE;