GNOME Bugzilla – Bug 731297
Get rid of overshooting window/animation
Last modified: 2014-07-10 03:23:34 UTC
The way the overshooting animation is done on kinetic scrolling has a few shortcomings: - It requires an extra GdkWindow, which is moved around - on top/left directions, a resize must still be queued just to have contents pulled in those directions, in addition to resizing the overshoot window I'm attaching a patch for comments that replaces the overshoot elasticity animation with a gradient, more popular nowadays. This is also friendlier in that it removes the overshoot window altogether, and notifying this just a non-recursive invalidation on gtk_widget_get_window(scrolled_window). Worth pointing out, in the patch I use GTK_STYLE_CLASS_RUBBERBAND for styling, that should become a new style class.
Created attachment 277976 [details] [review] scrolledwindow: Remove overshoot window and displacement animation The displacement animation has been replaced by edge gradients, that have a stronger color the harder overshooting is hit. This makes it possible to remove the internal overshoot window, which was merely used to have contents displaced when overshooting to top/left. Overshooting to bottom/right used to cause queue_resize() to be called on the scrolled window, this isn't necessary anymore either.
would it be possible to attach a recording of the effect?
Sure :), https://people.gnome.org/~carlosg/no-overshoot-displacement.webm
Looks good to me, from trying it out.
Review of attachment 277976 [details] [review]: .
Created attachment 279838 [details] [review] stylecontext: Add GTK_STYLE_CLASS_OVERSHOOT This class is meant to render the hint on scrolledwindow corners when scrolling past-limits.
Created attachment 279839 [details] [review] scrolledwindow: Remove overshoot window and displacement animation The displacement animation has been replaced by edge gradients, that have a stronger color the harder overshooting is hit. This makes it possible to remove the internal overshoot window, which was merely used to have contents displaced when overshooting to top/left. Overshooting to bottom/right used to cause queue_resize() to be called on the scrolled window, this isn't necessary anymore either.
Created attachment 279840 [details] [review] Adwaita: Set a background color for the overshoot class
Review of attachment 279838 [details] [review]: ok
Review of attachment 279839 [details] [review]: ok
Review of attachment 279840 [details] [review]: sure
Attachment 279838 [details] pushed as 18c113c - stylecontext: Add GTK_STYLE_CLASS_OVERSHOOT Attachment 279839 [details] pushed as 7bdc219 - scrolledwindow: Remove overshoot window and displacement animation Attachment 279840 [details] pushed as d3b481a - Adwaita: Set a background color for the overshoot class