]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/scrolbar.cpp
image handlers moved to separate headers (imagbmp.h etc.) This change is backward...
[wxWidgets.git] / src / gtk1 / scrolbar.cpp
index 43997ce96d48598960e305235bcc0259070f6268..09888e60cd577040e983b46beb6a9589a77f0f84 100644 (file)
 #if wxUSE_SCROLLBAR
 
 #include "wx/utils.h"
+
 #include <math.h>
 
-#include "gdk/gdk.h"
-#include "gtk/gtk.h"
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
 
 //-----------------------------------------------------------------------------
 // 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;
     }