X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9e691f46b2ec1b5dbbff2e51131e3c532e688a89..a9fc5eec8b1facb001552e61e28c88a22034f199:/src/gtk/spinbutt.cpp diff --git a/src/gtk/spinbutt.cpp b/src/gtk/spinbutt.cpp index 2688602473..423947a1d3 100644 --- a/src/gtk/spinbutt.cpp +++ b/src/gtk/spinbutt.cpp @@ -8,11 +8,14 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "spinbutt.h" #pragma implementation "spinbutbase.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #include "wx/spinbutt.h" #if wxUSE_SPINBTN @@ -147,11 +150,7 @@ bool wxSpinButton::Create(wxWindow *parent, m_parent->DoAddChild( this ); - PostCreation(); - - SetBackgroundColour( parent->GetBackgroundColour() ); - - Show( TRUE ); + PostCreation(new_size); return TRUE; } @@ -237,4 +236,13 @@ wxSize wxSpinButton::DoGetBestSize() const return wxSize(15, 26); } +// static +wxVisualAttributes +wxSpinButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) +{ + // TODO: overload to accept functions like gtk_spin_button_new? + // Until then use a similar type + return GetDefaultAttributesFromGTKWidget(gtk_button_new); +} + #endif