gtkscrolledwindow: Add fixed multiplier to scroll events in surface units
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 5 Aug 2022 15:13:28 +0000 (17:13 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Sun, 7 Aug 2022 15:16:14 +0000 (17:16 +0200)
commitc68247f63ba1db8849eb1679e53a64f7f2633973
treeb9bd498ee945299c9c74353d581bf6f842ac6b1f
parentadba0b972e2a86d8f169222d7e64c346dc746325
gtkscrolledwindow: Add fixed multiplier to scroll events in surface units

The expected configurability is not going to arrive yet from compositors, and
it is precipitate for GTK to gain any configurability. We do know a factor of 1
feels way too slow, and we do know a factor of page_size * pow (2 / 3) feels way
way too fast.

With the previous multiplier, gtk4-demo at its default size had a vertical textview
factor of 64.332901, and maximized on a 1920x1080 screen a factor of 97.585365.
Pick a magic multiplier that is both significantly below these values and above 1,
and stick to it.

Future work will add the configurability of smooth scroll events where it belongs.
At that point this commit may be reverted so we don't pile up on magic numbers again.

Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/4793
gtk/gtkscrolledwindow.c