[gtk+] searchbar: Add an element name to the css node



commit ea5f16fd2d5e1f9b14290c6d0eae3df092276d01
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Oct 29 07:43:30 2015 -0400

    searchbar: Add an element name to the css node
    
    This lets us avoid hardcoding the type in CSS.

 gtk/gtksearchbar.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtksearchbar.c b/gtk/gtksearchbar.c
index 97d48d1..8833fee 100644
--- a/gtk/gtksearchbar.c
+++ b/gtk/gtksearchbar.c
@@ -56,6 +56,10 @@
  * The following example shows you how to create a more complex search
  * entry.
  *
+ * # CSS nodes
+ *
+ * GtkSearchBar has a single CSS node with name searchbar.
+ *
  * ## Creating a search bar
  *
  * [A simple example](https://git.gnome.org/browse/gtk+/tree/examples/search-bar.c)
@@ -421,6 +425,8 @@ gtk_search_bar_class_init (GtkSearchBarClass *klass)
   gtk_widget_class_bind_template_child_internal_private (widget_class, GtkSearchBar, revealer);
   gtk_widget_class_bind_template_child_internal_private (widget_class, GtkSearchBar, box_center);
   gtk_widget_class_bind_template_child_internal_private (widget_class, GtkSearchBar, close_button);
+
+  gtk_widget_class_set_css_name (widget_class, "searchbar");
 }
 
 static void


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