X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b904684fb51ee37b2ac32b2bada4bd2ad4fc994..b77b87881bae2e6306366d79e7fe160334b3d4a2:/src/gtk/spinctrl.cpp diff --git a/src/gtk/spinctrl.cpp b/src/gtk/spinctrl.cpp index 2fbffa6771..e071efbce9 100644 --- a/src/gtk/spinctrl.cpp +++ b/src/gtk/spinctrl.cpp @@ -8,10 +8,13 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "spinctrl.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #include "wx/spinctrl.h" #if wxUSE_SPINCTRL @@ -124,9 +127,8 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id, m_parent->DoAddChild( this ); PostCreation(); + InheritAttributes(); - SetFont( parent->GetFont() ); - wxSize size_best( DoGetBestSize() ); wxSize new_size( size ); if (new_size.x == -1) @@ -138,8 +140,6 @@ bool wxSpinCtrl::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() ); - SetValue( value ); Show( TRUE );