]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/scrolbar.cpp
use HasTransparentBackground() to correctly draw the background of static text/box...
[wxWidgets.git] / src / gtk / scrolbar.cpp
index 42fa93452df1121c0b1f2688c68a1176cec51ff7..af054a217cc0f79b21157784e82f4cb4f752411c 100644 (file)
@@ -8,20 +8,19 @@
 /////////////////////////////////////////////////////////////////////////////
 
 
-#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
 
 #include "wx/scrolbar.h"
 
 #include "wx/utils.h"
-
-#include <math.h>
-
+#include "wx/math.h"
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
@@ -178,13 +177,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 +323,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