diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index 996c428eaa..54600e3d10 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -16,10 +16,11 @@ #if wxUSE_SLIDER #include "wx/utils.h" + #include -#include "gdk/gdk.h" -#include "gtk/gtk.h" +#include +#include //----------------------------------------------------------------------------- // idle system @@ -34,6 +35,8 @@ extern bool g_isIdle; extern bool g_blockEventsOnDrag; +static const float sensitivity = 0.02; + //----------------------------------------------------------------------------- // "value_changed" //----------------------------------------------------------------------------- @@ -46,7 +49,7 @@ static void gtk_slider_callback( GtkAdjustment *adjust, wxSlider *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; @@ -79,14 +82,6 @@ static void gtk_slider_callback( GtkAdjustment *adjust, wxSlider *win ) IMPLEMENT_DYNAMIC_CLASS(wxSlider,wxControl) -wxSlider::wxSlider(void) -{ -} - -wxSlider::~wxSlider(void) -{ -} - bool wxSlider::Create(wxWindow *parent, wxWindowID id, int value, int minValue, int maxValue, const wxPoint& pos, const wxSize& size, diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp index 996c428eaa..54600e3d10 100644 --- a/src/gtk1/slider.cpp +++ b/src/gtk1/slider.cpp @@ -16,10 +16,11 @@ #if wxUSE_SLIDER #include "wx/utils.h" + #include -#include "gdk/gdk.h" -#include "gtk/gtk.h" +#include +#include //----------------------------------------------------------------------------- // idle system @@ -34,6 +35,8 @@ extern bool g_isIdle; extern bool g_blockEventsOnDrag; +static const float sensitivity = 0.02; + //----------------------------------------------------------------------------- // "value_changed" //----------------------------------------------------------------------------- @@ -46,7 +49,7 @@ static void gtk_slider_callback( GtkAdjustment *adjust, wxSlider *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; @@ -79,14 +82,6 @@ static void gtk_slider_callback( GtkAdjustment *adjust, wxSlider *win ) IMPLEMENT_DYNAMIC_CLASS(wxSlider,wxControl) -wxSlider::wxSlider(void) -{ -} - -wxSlider::~wxSlider(void) -{ -} - bool wxSlider::Create(wxWindow *parent, wxWindowID id, int value, int minValue, int maxValue, const wxPoint& pos, const wxSize& size,