X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e90c1d2a19361551eb07778280f22be3e759cf64..5c5ab9ebc3a7dd441c9e3b25cb3daf8f733c374f:/src/gtk1/scrolbar.cpp diff --git a/src/gtk1/scrolbar.cpp b/src/gtk1/scrolbar.cpp index 4d21168158..09888e60cd 100644 --- a/src/gtk1/scrolbar.cpp +++ b/src/gtk1/scrolbar.cpp @@ -17,10 +17,11 @@ #if wxUSE_SCROLLBAR #include "wx/utils.h" + #include -#include "gdk/gdk.h" -#include "gtk/gtk.h" +#include +#include //----------------------------------------------------------------------------- // idle system @@ -36,6 +37,8 @@ extern bool g_isIdle; extern bool g_blockEventsOnDrag; extern bool g_blockEventsOnScroll; +static const float sensitivity = 0.02; + //----------------------------------------------------------------------------- // "value_changed" //----------------------------------------------------------------------------- @@ -48,7 +51,7 @@ static void gtk_scrollbar_callback( GtkAdjustment *adjust, wxScrollBar *win ) if (g_blockEventsOnDrag) return; float diff = adjust->value - win->m_oldPos; - if (fabs(diff) < 0.2) return; + if (fabs(diff) < sensitivity) return; win->m_oldPos = adjust->value; @@ -129,7 +132,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, if (!PreCreation( parent, pos, size ) || !CreateBase( parent, id, pos, size, style, validator, name )) { - wxFAIL_MSG( T("wxScrollBar creation failed") ); + wxFAIL_MSG( wxT("wxScrollBar creation failed") ); return FALSE; }