X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/abdeb9e7006488bf917d90048fcd0cbe22f44a71..26364344e58ae9c384965ff25c6920a75c55184e:/src/gtk/spinbutt.cpp diff --git a/src/gtk/spinbutt.cpp b/src/gtk/spinbutt.cpp index f0db6cb58b..c11142163f 100644 --- a/src/gtk/spinbutt.cpp +++ b/src/gtk/spinbutt.cpp @@ -21,9 +21,7 @@ #if wxUSE_SPINBTN #include "wx/utils.h" - -#include - +#include "wx/math.h" #include "wx/gtk/private.h" //----------------------------------------------------------------------------- @@ -225,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