[gtk] widget: Use cssnode api to get the filter value



commit 73ce43745967c865b2fba22ef267d61b38e923d6
Author: Timm Bäder <mail baedert org>
Date:   Thu Jan 2 10:04:29 2020 +0100

    widget: Use cssnode api to get the filter value
    
    it's confusing that we use GtkStyleContext here while we use the CssNode
    directly elsewhere.

 gtk/gtkwidget.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 2a67391479..433dfe2f06 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -12670,8 +12670,9 @@ gtk_widget_create_render_node (GtkWidget   *widget,
                            "RenderNode for %s %p",
                            G_OBJECT_TYPE_NAME (widget), widget);
 
-  filter_value = _gtk_style_context_peek_property (_gtk_widget_get_style_context (widget), 
GTK_CSS_PROPERTY_FILTER);
-  gtk_css_filter_value_push_snapshot (filter_value, snapshot);
+  filter_value = gtk_css_style_get_value (gtk_css_node_get_style (priv->cssnode), GTK_CSS_PROPERTY_FILTER);
+  if (filter_value)
+    gtk_css_filter_value_push_snapshot (filter_value, snapshot);
 
   if (opacity < 1.0)
     gtk_snapshot_push_opacity (snapshot, opacity);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]