mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-04 09:40:19 +00:00
cssnode: Set new style if it's animated
In commit 2c61316677
we avoided emitting
the style-changed signal if no CSS property changed.
Unfortunately, this also caused CSS styles to not be updated when
animations started if those animations did not change any CSS value
immediately. In those cases the animation would just never start.
The obvious example was the spinner.
This commit is contained in:
parent
b22a07ec66
commit
eb97ef0514
@ -959,7 +959,16 @@ gtk_css_node_set_style (GtkCssNode *cssnode,
|
||||
|
||||
style_changed = gtk_css_style_change_has_change (&change);
|
||||
if (style_changed)
|
||||
g_signal_emit (cssnode, cssnode_signals[STYLE_CHANGED], 0, &change);
|
||||
{
|
||||
g_signal_emit (cssnode, cssnode_signals[STYLE_CHANGED], 0, &change);
|
||||
}
|
||||
else if (cssnode->style != style &&
|
||||
(GTK_IS_CSS_ANIMATED_STYLE (cssnode->style) || GTK_IS_CSS_ANIMATED_STYLE (style)))
|
||||
{
|
||||
/* This is when animations are starting/stopping but they didn't change any CSS this frame */
|
||||
g_object_unref (cssnode->style);
|
||||
cssnode->style = g_object_ref (style);
|
||||
}
|
||||
|
||||
gtk_css_style_change_finish (&change);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user