[gtk+] headerbar: Use an element name instead of a style class



commit 8c0c0f9c07068286ef3b345bb37e4f91146b57bb
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Oct 30 01:07:58 2015 -0400

    headerbar: Use an element name instead of a style class
    
    Use the element name headerbar.

 gtk/gtkheaderbar.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c
index 042bb42..53bd4d5 100644
--- a/gtk/gtkheaderbar.c
+++ b/gtk/gtkheaderbar.c
@@ -585,7 +585,6 @@ construct_label_box (GtkHeaderBar *bar)
 static void
 gtk_header_bar_init (GtkHeaderBar *bar)
 {
-  GtkStyleContext *context;
   GtkHeaderBarPrivate *priv;
 
   priv = gtk_header_bar_get_instance_private (bar);
@@ -604,10 +603,6 @@ gtk_header_bar_init (GtkHeaderBar *bar)
 
   init_sizing_box (bar);
   construct_label_box (bar);
-
-  context = gtk_widget_get_style_context (GTK_WIDGET (bar));
-  gtk_style_context_add_class (context, "header-bar");
-  gtk_style_context_add_class (context, GTK_STYLE_CLASS_HORIZONTAL);
 }
 
 static gint
@@ -1975,6 +1970,7 @@ gtk_header_bar_class_init (GtkHeaderBarClass *class)
   g_object_class_install_properties (object_class, LAST_PROP, header_bar_props);
 
   gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_PANEL);
+  gtk_widget_class_set_css_name (widget_class, "headerbar");
 }
 
 static void


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