]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/scrolbar.cpp
set device origin when drawing on a frame in order to not overwrite the menu/toolbar...
[wxWidgets.git] / src / gtk / scrolbar.cpp
index 14530aef2481d411d71545cdf940e7758575a60b..edc4f34d719e579a5ad505dd4400523c2b967c9c 100644 (file)
@@ -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