X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/acfd422afac254f4356904275656c0c15685fa1e..c50f1fb9226d9260454ccb9c8a67d0be23c2827f:/src/gtk1/spinbutt.cpp diff --git a/src/gtk1/spinbutt.cpp b/src/gtk1/spinbutt.cpp index 73f6493e81..66f5af6bc3 100644 --- a/src/gtk1/spinbutt.cpp +++ b/src/gtk1/spinbutt.cpp @@ -13,6 +13,9 @@ #endif #include "wx/spinbutt.h" + +#ifdef wxUSE_SPINBTN + #include "wx/utils.h" #include @@ -42,7 +45,7 @@ static void gtk_spinbutt_callback( GtkWidget *WXUNUSED(widget), wxSpinButton *wi { if (g_isIdle) wxapp_install_idle_handler(); - if (!win->HasVMT()) return; + if (!win->m_hasVMT) return; if (g_blockEventsOnDrag) return; float diff = win->m_adjust->value - win->m_oldPos; @@ -90,7 +93,7 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c m_needParent = TRUE; wxSize new_size = size; - new_size.x = 16; + new_size.x = 15; if (new_size.y == -1) new_size.y = 30; @@ -111,9 +114,7 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c (GtkSignalFunc) gtk_spinbutt_callback, (gpointer) this ); - m_parent->AddChild( this ); - - (m_parent->m_insertCallback)( m_parent, this ); + m_parent->DoAddChild( this ); PostCreation(); @@ -185,7 +186,7 @@ void wxSpinButton::OnSize( wxSizeEvent &WXUNUSED(event) ) { wxCHECK_RET( (m_widget != NULL), _T("invalid spin button") ); - m_width = 16; + m_width = 15; gtk_widget_set_usize( m_widget, m_width, m_height ); } @@ -210,3 +211,5 @@ wxSpinEvent::wxSpinEvent(wxEventType commandType, int id): wxScrollEvent(commandType, id) { } + +#endif \ No newline at end of file