gtkscrolledwindow: Add scroll unit handling
authorpanoplie <59100-panoplie@users.noreply.gitlab.gnome.org>
Mon, 21 Feb 2022 15:24:00 +0000 (16:24 +0100)
committerpanoplie <59100-panoplie@users.noreply.gitlab.gnome.org>
Fri, 18 Mar 2022 23:41:26 +0000 (00:41 +0100)
commit53956e5389e7ea2a48f5133f27ac2a42b4de82aa
tree3a16ef1ba62ff4324b4b6d57a0ce025af0886266
parent3ab63fd03b447c3d1fccd8f22d2925bf6d10ad2f
gtkscrolledwindow: Add scroll unit handling

On the "scroll" signal, the widget uses
gtk_event_controller_scroll_get_unit() to get the
scroll unit.

When the unit is GDK_SCROLL_UNIT_WHEEL, the
behavior is unchanged: the widget scrolls a
certain number of pixels at each wheel detent
click. This number of pixels is determined by the
window dimensions in get_wheel_detent_scroll_step().

When the delta unit is GDK_SCROLL_UNIT_SURFACE, the
widget directly adds the delta to the number of
scrolled pixels no matter the window dimensions.
gtk/gtkscrolledwindow.c