Commit 29b8cfc9 authored by Daniel Boles's avatar Daniel Boles Committed by Daniel Boles

Range: Fix inverted horizontal scroll wheel events

Bug 737175 aimed to ensure that scrolling up on a horizontal range would
result in its value increasing, as that’s what users intuitively expect.
However, its commit 416c370d meant that,
if the event gives scroll deltas, we inverted our delta unconditionally.

So it broke horizontal scrolling: scrolling left moved the slider right…

We must only invert if using dy as delta. dx already has the right sign,
so inverting it was wrong.
parent d2f027a9
......@@ -2313,7 +2313,7 @@ gtk_range_scroll_controller_scroll (GtkEventControllerScroll *scroll,
if (gtk_orientable_get_orientation (GTK_ORIENTABLE (range)) == GTK_ORIENTATION_HORIZONTAL)
delta = - (dx ? dx : dy) * scroll_unit;
delta = (dx ? dx : -dy) * scroll_unit;
delta = dy * scroll_unit;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment