sfs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -13,15 +13,8 @@
|
|||||||
|
|
||||||
#include "wx/region.h"
|
#include "wx/region.h"
|
||||||
|
|
||||||
#include "gdk/gdk.h"
|
#include <gdk/gdk.h>
|
||||||
#include "gtk/gtk.h"
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#ifdef __WXDEBUG__
|
|
||||||
#ifdef NULL
|
|
||||||
#undef NULL
|
|
||||||
#endif
|
|
||||||
#define NULL ((void*)0L)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxRegion
|
// wxRegion
|
||||||
|
@@ -17,10 +17,11 @@
|
|||||||
#if wxUSE_SCROLLBAR
|
#if wxUSE_SCROLLBAR
|
||||||
|
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "gdk/gdk.h"
|
#include <gdk/gdk.h>
|
||||||
#include "gtk/gtk.h"
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// idle system
|
// idle system
|
||||||
@@ -36,6 +37,8 @@ extern bool g_isIdle;
|
|||||||
extern bool g_blockEventsOnDrag;
|
extern bool g_blockEventsOnDrag;
|
||||||
extern bool g_blockEventsOnScroll;
|
extern bool g_blockEventsOnScroll;
|
||||||
|
|
||||||
|
static const float sensitivity = 0.02;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// "value_changed"
|
// "value_changed"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -48,7 +51,7 @@ static void gtk_scrollbar_callback( GtkAdjustment *adjust, wxScrollBar *win )
|
|||||||
if (g_blockEventsOnDrag) return;
|
if (g_blockEventsOnDrag) return;
|
||||||
|
|
||||||
float diff = adjust->value - win->m_oldPos;
|
float diff = adjust->value - win->m_oldPos;
|
||||||
if (fabs(diff) < 0.2) return;
|
if (fabs(diff) < sensitivity) return;
|
||||||
|
|
||||||
win->m_oldPos = adjust->value;
|
win->m_oldPos = adjust->value;
|
||||||
|
|
||||||
|
@@ -15,8 +15,8 @@
|
|||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
#include "wx/debug.h"
|
#include "wx/debug.h"
|
||||||
|
|
||||||
#include "gdk/gdk.h"
|
#include <gdk/gdk.h>
|
||||||
#include "gtk/gtk.h"
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#define wxSYS_COLOUR_SCROLLBAR 0
|
#define wxSYS_COLOUR_SCROLLBAR 0
|
||||||
|
@@ -13,15 +13,8 @@
|
|||||||
|
|
||||||
#include "wx/region.h"
|
#include "wx/region.h"
|
||||||
|
|
||||||
#include "gdk/gdk.h"
|
#include <gdk/gdk.h>
|
||||||
#include "gtk/gtk.h"
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#ifdef __WXDEBUG__
|
|
||||||
#ifdef NULL
|
|
||||||
#undef NULL
|
|
||||||
#endif
|
|
||||||
#define NULL ((void*)0L)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxRegion
|
// wxRegion
|
||||||
|
@@ -17,10 +17,11 @@
|
|||||||
#if wxUSE_SCROLLBAR
|
#if wxUSE_SCROLLBAR
|
||||||
|
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "gdk/gdk.h"
|
#include <gdk/gdk.h>
|
||||||
#include "gtk/gtk.h"
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// idle system
|
// idle system
|
||||||
@@ -36,6 +37,8 @@ extern bool g_isIdle;
|
|||||||
extern bool g_blockEventsOnDrag;
|
extern bool g_blockEventsOnDrag;
|
||||||
extern bool g_blockEventsOnScroll;
|
extern bool g_blockEventsOnScroll;
|
||||||
|
|
||||||
|
static const float sensitivity = 0.02;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// "value_changed"
|
// "value_changed"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -48,7 +51,7 @@ static void gtk_scrollbar_callback( GtkAdjustment *adjust, wxScrollBar *win )
|
|||||||
if (g_blockEventsOnDrag) return;
|
if (g_blockEventsOnDrag) return;
|
||||||
|
|
||||||
float diff = adjust->value - win->m_oldPos;
|
float diff = adjust->value - win->m_oldPos;
|
||||||
if (fabs(diff) < 0.2) return;
|
if (fabs(diff) < sensitivity) return;
|
||||||
|
|
||||||
win->m_oldPos = adjust->value;
|
win->m_oldPos = adjust->value;
|
||||||
|
|
||||||
|
@@ -15,8 +15,8 @@
|
|||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
#include "wx/debug.h"
|
#include "wx/debug.h"
|
||||||
|
|
||||||
#include "gdk/gdk.h"
|
#include <gdk/gdk.h>
|
||||||
#include "gtk/gtk.h"
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#define wxSYS_COLOUR_SCROLLBAR 0
|
#define wxSYS_COLOUR_SCROLLBAR 0
|
||||||
|
Reference in New Issue
Block a user