[gtk+/gtk-3-22] Range: Fix inverted vert scrolling on horiz Ranges



commit 4d18a346c14898db2f0e014eaeaa54932b670ea6
Author: Daniel Boles <dboles src gnome org>
Date:   Tue Dec 19 18:07:02 2017 +0000

    Range: Fix inverted vert scrolling on horiz Ranges
    
    Users expect, & previous patches have tried to assure, that scrolling up
    over a horizontal Range will cause the value to increase & vice-versa.
    But the path using directions was still negating the delta & decreasing
    the value on scrolling up. This could be seen on Win32 or X without XI2.
    
    So, only negate the delta when scrolling down (or left), not up, so that
    scrolling up (or right) will make the value increase for any event type.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=737175#c5

 gtk/gtkrange.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 7873687..16e78f1 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -3059,7 +3059,7 @@ _gtk_range_get_wheel_delta (GtkRange       *range,
     }
   else if (gdk_event_get_scroll_direction ((GdkEvent *) event, &direction))
     {
-      if (direction == GDK_SCROLL_UP ||
+      if (direction == GDK_SCROLL_DOWN ||
           direction == GDK_SCROLL_LEFT)
         delta = - scroll_unit;
       else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]