X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e8e24dfa9322702d56a125586a7d4a37f4a5dfd7..6d3ef2255e608c68954a61323176856332086368:/src/gtk1/spinbutt.cpp diff --git a/src/gtk1/spinbutt.cpp b/src/gtk1/spinbutt.cpp index 2d5eb9650c..4ac29c9c25 100644 --- a/src/gtk1/spinbutt.cpp +++ b/src/gtk1/spinbutt.cpp @@ -150,10 +150,7 @@ bool wxSpinButton::Create(wxWindow *parent, m_parent->DoAddChild( this ); - PostCreation(); - InheritAttributes(); - - Show( TRUE ); + PostCreation(new_size); return TRUE; } @@ -228,15 +225,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