X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a2615ebc22a402b1badb46475f94ab6aa3a64018..320c341a1017798148ace98f7416c8a3cc902c04:/src/gtk1/scrolbar.cpp diff --git a/src/gtk1/scrolbar.cpp b/src/gtk1/scrolbar.cpp index 14530aef24..edc4f34d71 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 @@ -179,8 +180,9 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, m_parent->DoAddChild( this ); PostCreation(); + InheritAttributes(); - SetBackgroundColour( parent->GetBackgroundColour() ); + SetBestSize(size); Show( TRUE ); @@ -334,4 +336,9 @@ void wxScrollBar::ApplyWidgetStyle() gtk_widget_set_style( m_widget, m_widgetStyle ); } +wxSize wxScrollBar::DoGetBestSize() const +{ + return wxControl::DoGetBestSize(); +} + #endif