[gtk/style-context-redux: 161/164] widget: Stop using style context internally
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/style-context-redux: 161/164] widget: Stop using style context internally
- Date: Sat, 25 Jan 2020 19:20:50 +0000 (UTC)
commit 7da6fdc30e27ab212b6fc0544c69621d1b33fa14
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jan 18 03:12:01 2020 -0500
widget: Stop using style context internally
gtk/gtkwidget.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 283c5163e3..fabb8b0d78 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -5645,9 +5645,6 @@ gtk_widget_set_name (GtkWidget *widget,
g_free (priv->name);
priv->name = g_strdup (name);
- if (priv->context)
- gtk_style_context_set_id (priv->context, priv->name);
-
gtk_css_node_set_id (priv->cssnode, priv->name);
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_NAME]);
@@ -8099,7 +8096,7 @@ gtk_widget_propagate_state (GtkWidget *widget,
if (!gtk_widget_is_sensitive (widget) && gtk_widget_has_grab (widget))
gtk_grab_remove (widget);
- gtk_style_context_set_state (_gtk_widget_get_style_context (widget), new_flags);
+ gtk_css_node_set_state (priv->cssnode, new_flags);
g_signal_emit (widget, widget_signals[STATE_FLAGS_CHANGED], 0, old_flags);
@@ -11315,8 +11312,6 @@ gtk_widget_get_style_context (GtkWidget *widget)
priv->context = gtk_style_context_new_for_node (priv->cssnode);
- gtk_style_context_set_id (priv->context, priv->name);
- gtk_style_context_set_state (priv->context, priv->state_flags);
gtk_style_context_set_scale (priv->context, gtk_widget_get_scale_factor (widget));
display = _gtk_widget_get_display (widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]