[gtk+] widget: Set a css name



commit f7ec9c98ef0ef8740c93f96af9d971b0211118c1
Author: Benjamin Otte <otte redhat com>
Date:   Thu Feb 4 17:22:39 2016 +0100

    widget: Set a css name
    
    Now selecting a widget by class name no longer works.
    
    This is probably most relevant for users outside of GTK that want to
    style their own widgets. Those widgets should now either add their own
    style classes (if they want to adjust existing CSS) or use
    gtk_widget_class_set_css_name() themselves (if they want to get rid of
    all "upstream" styling).

 gtk/gtkwidget.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 3b7b062..bc1f786 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3670,6 +3670,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
                                                              GTK_PARAM_READABLE));
 
   gtk_widget_class_set_accessible_type (klass, GTK_TYPE_WIDGET_ACCESSIBLE);
+  gtk_widget_class_set_css_name (klass, "widget");
 }
 
 static void


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