X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eaafd2f8b7acf211feb30c86db037fffe22ee565..d284c07534af75014345a80363a7036897b5e388:/src/gtk/checkbox.cpp diff --git a/src/gtk/checkbox.cpp b/src/gtk/checkbox.cpp index c49c46ccff..2a7d0437bf 100644 --- a/src/gtk/checkbox.cpp +++ b/src/gtk/checkbox.cpp @@ -8,10 +8,13 @@ ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "checkbox.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #include "wx/defs.h" #if wxUSE_CHECKBOX @@ -118,8 +121,7 @@ bool wxCheckBox::Create(wxWindow *parent, m_parent->DoAddChild( this ); PostCreation(); - - SetFont( parent->GetFont() ); + InheritAttributes(); wxSize size_best( DoGetBestSize() ); wxSize new_size( size ); @@ -130,9 +132,6 @@ bool wxCheckBox::Create(wxWindow *parent, 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; @@ -220,7 +219,8 @@ void wxCheckBox::OnInternalIdle() } } - UpdateWindowUI(); + if (wxUpdateUIEvent::CanUpdate(this)) + UpdateWindowUI(wxUPDATE_UI_FROMIDLE); } wxSize wxCheckBox::DoGetBestSize() const