GNOME: Smoother Scrolling of Text Views
When working on GTK 4, special care was taken to ensure that most of a GtkTextView
‘s content could be rendered without GL program changes and maximal use of glDrawArrays()
with vertices from a VBO.
That goes a long way towards making smooth scrolling.
In recent releases, GTK gained support for scrolling using more precise scroll units. On macOS with Apple touchpads, for example, that might map physical distance to a certain number of logical pixels within the application.
If you’re at 2x scaling, you might get values from the input system with “half pixel” values (e.g. .5
) since that would map just fine to the physical pixel boundary of the underlying display server.