X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f15c5febf5b9ae6ba7a8d3793fa0a187fac1980..051b55ad8ba1efe5f7c16c430131d4cd1b5fb90e:/src/gtk/spinbutt.cpp diff --git a/src/gtk/spinbutt.cpp b/src/gtk/spinbutt.cpp index afbd61ee1e..e582670902 100644 --- a/src/gtk/spinbutt.cpp +++ b/src/gtk/spinbutt.cpp @@ -19,6 +19,13 @@ #include "gdk/gdk.h" #include "gtk/gtk.h" +//----------------------------------------------------------------------------- +// idle system +//----------------------------------------------------------------------------- + +extern void wxapp_install_idle_handler(); +extern bool g_isIdle; + //----------------------------------------------------------------------------- // data //----------------------------------------------------------------------------- @@ -33,6 +40,8 @@ static const float sensitivity = 0.2; static void gtk_spinbutt_callback( GtkWidget *WXUNUSED(widget), wxSpinButton *win ) { + if (g_isIdle) wxapp_install_idle_handler(); + if (!win->HasVMT()) return; if (g_blockEventsOnDrag) return; @@ -81,7 +90,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; @@ -176,7 +185,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 ); }