GtkRange: make autoscrolling work for inverted ranges

This problem was discovered in
https://bugzilla.gnome.org/show_bug.cgi?id=725225
This commit is contained in:
Matthias Clasen 2014-03-03 17:49:38 -05:00
parent f0e6eb3ce0
commit 07fc894020

View File

@ -3054,9 +3054,9 @@ update_autoscroll_mode (GtkRange *range)
}
if (pos < SCROLL_EDGE_SIZE)
mode = GTK_SCROLL_STEP_BACKWARD;
mode = range->priv->inverted ? GTK_SCROLL_STEP_FORWARD : GTK_SCROLL_STEP_BACKWARD;
else if (pos > (size - SCROLL_EDGE_SIZE))
mode = GTK_SCROLL_STEP_FORWARD;
mode = range->priv->inverted ? GTK_SCROLL_STEP_BACKWARD : GTK_SCROLL_STEP_FORWARD;
}
if (mode != range->priv->autoscroll_mode)