X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f980cffb852bd48ecd5ca8248c1926f3bf25572..49e3e2c25f93dd8114b36155de1756139b7f18b9:/src/gtk/scrolbar.cpp?ds=sidebyside diff --git a/src/gtk/scrolbar.cpp b/src/gtk/scrolbar.cpp index 42fa93452d..f2d26ced1d 100644 --- a/src/gtk/scrolbar.cpp +++ b/src/gtk/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,13 +179,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, m_parent->DoAddChild( this ); - PostCreation(); - - SetBestSize(size); - - SetBackgroundColour( parent->GetBackgroundColour() ); - - Show( TRUE ); + PostCreation(size); return TRUE; } @@ -330,15 +325,16 @@ bool wxScrollBar::IsOwnGtkWindow( GdkWindow *window ) ); } -void wxScrollBar::ApplyWidgetStyle() +wxSize wxScrollBar::DoGetBestSize() const { - SetWidgetStyle(); - gtk_widget_set_style( m_widget, m_widgetStyle ); + return wxControl::DoGetBestSize(); } -wxSize wxScrollBar::DoGetBestSize() const +// static +wxVisualAttributes +wxScrollBar::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) { - return wxControl::DoGetBestSize(); + return GetDefaultAttributesFromGTKWidget(gtk_vscrollbar_new); } #endif