X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fab591c5cceff41c0bedaa89af34cd039e2c44e1..2f35f36bbcde256c802a4e0871c3d74e39ee476c:/src/gtk1/statbox.cpp diff --git a/src/gtk1/statbox.cpp b/src/gtk1/statbox.cpp index 5777e99153..879e2bc579 100644 --- a/src/gtk1/statbox.cpp +++ b/src/gtk1/statbox.cpp @@ -7,11 +7,12 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "statbox.h" #endif -#include "wx/defs.h" +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" #if wxUSE_STATBOX @@ -65,9 +66,7 @@ bool wxStaticBox::Create( wxWindow *parent, m_parent->DoAddChild( this ); - PostCreation(); - - InheritAttributes(); + PostCreation(size); // need to set non default alignment? gfloat xalign; @@ -81,8 +80,6 @@ bool wxStaticBox::Create( wxWindow *parent, if ( xalign ) gtk_frame_set_label_align(GTK_FRAME( m_widget ), xalign, 0.0); - Show( TRUE ); - return TRUE; } @@ -100,4 +97,11 @@ void wxStaticBox::ApplyWidgetStyle() gtk_widget_set_style( m_widget, m_widgetStyle ); } +// static +wxVisualAttributes +wxStaticBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) +{ + return GetDefaultAttributesFromGTKWidget(gtk_frame_new); +} + #endif // wxUSE_STATBOX