X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a2615ebc22a402b1badb46475f94ab6aa3a64018..31ad423e4fb556ec225a63b161154d3bf3445c1b:/src/gtk1/scrolbar.cpp diff --git a/src/gtk1/scrolbar.cpp b/src/gtk1/scrolbar.cpp index 14530aef24..f2d26ced1d 100644 --- a/src/gtk1/scrolbar.cpp +++ b/src/gtk1/scrolbar.cpp @@ -8,11 +8,12 @@ ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "scrolbar.h" #endif -#include "wx/defs.h" +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" #if wxUSE_SCROLLBAR @@ -178,11 +179,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, m_parent->DoAddChild( this ); - PostCreation(); - - SetBackgroundColour( parent->GetBackgroundColour() ); - - Show( TRUE ); + PostCreation(size); return TRUE; } @@ -328,10 +325,16 @@ bool wxScrollBar::IsOwnGtkWindow( GdkWindow *window ) ); } -void wxScrollBar::ApplyWidgetStyle() +wxSize wxScrollBar::DoGetBestSize() const +{ + return wxControl::DoGetBestSize(); +} + +// static +wxVisualAttributes +wxScrollBar::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) { - SetWidgetStyle(); - gtk_widget_set_style( m_widget, m_widgetStyle ); + return GetDefaultAttributesFromGTKWidget(gtk_vscrollbar_new); } #endif