We use gtk_adjustment_enable_animation to enable animated
updates of the adjustments. Currently, this is enabled
unconditionally, and with a duration that is hardcoded.
https://bugzilla.gnome.org/show_bug.cgi?id=732376
Add a private API that lets widget opt-in to animated updates of
the adjustment value. When enabled, all calls to
gtk_adjustment_set_value will smoothly transition from the old
value to the new value, using a fixed easing function and a
configurable duration. The animation is tied to the frame clock
of the widget.
By implementing this in GtkAdjustment, we can enable animation
for both scrollbars and keybindings, which are often implemented
in the child widget of the scrolled window.
https://bugzilla.gnome.org/show_bug.cgi?id=732376
This makes it possible to look up icons in resources using
the icon theme api, and should be used as a replacement
for installing icons below $pkgdatadir/icons and adding
that location to the search path.
Make icon lookup from resources work without the extra hicolor
component in the path. It is redundant, since we always treat
builtin icons as part of hicolor anyway.
Otherwise, we get every icon twice. To switch between symbolic
and non-symbolic icons, this css fragment comes in handy:
* { -gtk-icon-style: symbolic; }
Grabbing on a non-toplevel might not do what we want it to do, since it
will go on the focused widget, not the grabbed widget. Since we don't
focus the widget before clicking on it, that means that putting the
focus somewhere else and then clicking on the accelerator editor will
freeze the app. Additionally, since it's a global system grab that can't
be exited except by a key press that we won't ever get, it effectively
locks up your system as well unless you know how to break the grab or
kill the app. Ouch.
Since doing a device grab on a non-toplevel is generally considered a
bad idea, just don't do it. Use a GtkInvisible and take a grab on that
instead.
When validating the style context, we are copying the animations
from one StyleValues instance to another, and cancel the old ones.
It turns out that sometimes the old and the new StyleValues are
the same, and in this case, we end up cancelling the animations
for good.
One case where breakage from this was observed is that the spinners
in gtk3-widget-factory stop spinning when you open and close a modal
dialog on page 2. This depends a bit on the window manager; the problem
can only be seen if opening the dialog causes a transition to backdrop.
This changes the calculation of activity mode progress in the
same way as was done in GtkProgressBar a while ago, and make it
smooth, using a tick callback.