]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/spinbutt.cpp
fixed loop deleting the old filters in SetWildcard() after last commit
[wxWidgets.git] / src / gtk / spinbutt.cpp
index 2d5eb9650cd5acf8b9447475eec714eef6d5c6b4..c11142163ff1a7c8f5043eff5caea3b5d8ae5f95 100644 (file)
@@ -21,9 +21,7 @@
 #if wxUSE_SPINBTN
 
 #include "wx/utils.h"
-
-#include <math.h>
-
+#include "wx/math.h"
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
@@ -150,10 +148,7 @@ bool wxSpinButton::Create(wxWindow *parent,
 
     m_parent->DoAddChild( this );
 
-    PostCreation();
-    InheritAttributes();
-
-    Show( TRUE );
+    PostCreation(new_size);
 
     return TRUE;
 }
@@ -228,15 +223,20 @@ bool wxSpinButton::IsOwnGtkWindow( GdkWindow *window )
     return GTK_SPIN_BUTTON(m_widget)->panel == window;
 }
 
-void wxSpinButton::ApplyWidgetStyle()
+wxSize wxSpinButton::DoGetBestSize() const
 {
-    SetWidgetStyle();
-    gtk_widget_set_style( m_widget, m_widgetStyle );
+    wxSize best(15, 26); // FIXME
+    CacheBestSize(best);
+    return best;
 }
 
-wxSize wxSpinButton::DoGetBestSize() const
+// static
+wxVisualAttributes
+wxSpinButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
 {
-    return wxSize(15, 26);
+    // TODO: overload to accept functions like gtk_spin_button_new?
+    // Until then use a similar type
+    return GetDefaultAttributesFromGTKWidget(gtk_button_new);
 }
 
 #endif