Skip to content

Draft: ScrolledWindow: add interpolation animation on wheel clicks

panoplie requested to merge panoplie/gtk:scroll-interpolation into main

I try to implement a smooth scroll interpolation animation with low precision mice. From my testing, it feels very smooth and a bit like in Firefox so it seems to be on a good way! Unlike @djrenren solution djrenren/gtk@d28b623d I reimplement a dedicated animation algorithm outside of GtkAdjustment. The goal is to have the smoothest interpolation curve possible, deeling with unpredictable incoming wheel click events.

I have put a long comment to explain the mathematics behind. It's not too hard to understand if you know system of equations and derivatives.

This feature is useless with high precision scroll mice. I don't think we are able to automatically switch on/off it depending on the mouse scroll precision so I don't know how it will be managed. At this time, you can enable the feature by adding gtk-scroll-interpolation=true in settings.ini.

Need a lot of tests now ;)

Issue #702

Edited by panoplie

Merge request reports