diff options
author | Benjamin Otte <otte@redhat.com> | 2018-09-29 22:38:09 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-05-30 19:26:45 -0400 |
commit | 01386aef295e71588153759929713c71d0d9f92d (patch) | |
tree | ee3a948aeb95c9b3194b91530ede829fa775e78d /gtk/gtklistitem.c | |
parent | b3fb80c60825813f9cdea24831404a885eb6fba2 (diff) | |
download | gtk+-01386aef295e71588153759929713c71d0d9f92d.tar.gz |
listview: Reset listitems' CSS animations when rebinding
This way, newly displayed rows don't play an unselect animation (text
fading in) when they are unselected, but the row was previously used for
a selected item.
Diffstat (limited to 'gtk/gtklistitem.c')
-rw-r--r-- | gtk/gtklistitem.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtklistitem.c b/gtk/gtklistitem.c index a11b8b3cc8..411d187b89 100644 --- a/gtk/gtklistitem.c +++ b/gtk/gtklistitem.c @@ -22,8 +22,10 @@ #include "gtklistitemprivate.h" #include "gtkbinlayout.h" +#include "gtkcssnodeprivate.h" #include "gtkintl.h" #include "gtkwidget.h" +#include "gtkwidgetprivate.h" /** * SECTION:gtklistitem @@ -325,6 +327,8 @@ gtk_list_item_set_item (GtkListItem *self, if (item) self->item = g_object_ref (item); + gtk_css_node_invalidate (gtk_widget_get_css_node (GTK_WIDGET (self)), GTK_CSS_CHANGE_ANIMATIONS); + g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_ITEM]); } |