[gtk/wip/otte/listview: 1566/1575] listview: Reset listitems' CSS	animations when rebinding
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtk/wip/otte/listview: 1566/1575] listview: Reset listitems' CSS	animations when rebinding
- Date: Thu, 30 May 2019 14:13:07 +0000 (UTC)
commit 31c02b8d021df43d8eb78499c41a5c33699926da
Author: Benjamin Otte <otte redhat com>
Date:   Sat Sep 29 22:38:09 2018 +0200
    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.
 gtk/gtklistitem.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gtk/gtklistitem.c b/gtk/gtklistitem.c
index 4168b3d8de..822e4e8944 100644
--- a/gtk/gtklistitem.c
+++ b/gtk/gtklistitem.c
@@ -21,7 +21,9 @@
 
 #include "gtklistitemprivate.h"
 
+#include "gtkcssnodeprivate.h"
 #include "gtkintl.h"
+#include "gtkwidgetprivate.h"
 
 /**
  * SECTION:gtklistitem
@@ -263,6 +265,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]);
 }
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]