After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 731297 - Get rid of overshooting window/animation
Get rid of overshooting window/animation
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkScrolledWindow
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-06-05 21:53 UTC by Carlos Garnacho
Modified: 2014-07-10 03:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
scrolledwindow: Remove overshoot window and displacement animation (16.61 KB, patch)
2014-06-05 21:57 UTC, Carlos Garnacho
accepted-commit_now Details | Review
stylecontext: Add GTK_STYLE_CLASS_OVERSHOOT (1.49 KB, patch)
2014-07-03 13:02 UTC, Carlos Garnacho
committed Details | Review
scrolledwindow: Remove overshoot window and displacement animation (16.51 KB, patch)
2014-07-03 13:02 UTC, Carlos Garnacho
committed Details | Review
Adwaita: Set a background color for the overshoot class (1.87 KB, patch)
2014-07-03 13:02 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2014-06-05 21:53:18 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.
Comment 1 Carlos Garnacho 2014-06-05 21:57:50 UTC
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.
Comment 2 Emmanuele Bassi (:ebassi) 2014-06-05 22:25:56 UTC
would it be possible to attach a recording of the effect?
Comment 3 Carlos Garnacho 2014-06-05 22:42:55 UTC
Sure :), https://people.gnome.org/~carlosg/no-overshoot-displacement.webm
Comment 4 Matthias Clasen 2014-06-12 02:59:27 UTC
Looks good to me, from trying it out.
Comment 5 Matthias Clasen 2014-06-15 01:57:48 UTC
Review of attachment 277976 [details] [review]:

.
Comment 6 Carlos Garnacho 2014-07-03 13:02:23 UTC
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.
Comment 7 Carlos Garnacho 2014-07-03 13:02:29 UTC
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.
Comment 8 Carlos Garnacho 2014-07-03 13:02:34 UTC
Created attachment 279840 [details] [review]
Adwaita: Set a background color for the overshoot class
Comment 9 Matthias Clasen 2014-07-08 04:27:13 UTC
Review of attachment 279838 [details] [review]:

ok
Comment 10 Matthias Clasen 2014-07-08 04:27:26 UTC
Review of attachment 279838 [details] [review]:

ok
Comment 11 Matthias Clasen 2014-07-08 04:28:22 UTC
Review of attachment 279839 [details] [review]:

ok
Comment 12 Matthias Clasen 2014-07-08 04:28:53 UTC
Review of attachment 279840 [details] [review]:

sure
Comment 13 Matthias Clasen 2014-07-10 03:23:11 UTC
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