[gtk+] stylecontext: add GTK_STYLE_CLASS_TITLEBAR define



commit 3ea0e4a0197bacd060c18cf4c5752d0406344e0b
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Aug 16 19:25:32 2013 +0200

    stylecontext: add GTK_STYLE_CLASS_TITLEBAR define
    
    For consistency with the other stock style classes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706045

 docs/reference/gtk/gtk3-sections.txt |    1 +
 gtk/gtkstylecontext.h                |    7 +++++++
 gtk/gtkwindow.c                      |    2 +-
 3 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index affd743..7f3d614 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -5944,6 +5944,7 @@ GTK_STYLE_CLASS_OSD
 GTK_STYLE_CLASS_LEVEL_BAR
 GTK_STYLE_CLASS_CURSOR_HANDLE
 GTK_STYLE_CLASS_INSERTION_CURSOR
+GTK_STYLE_CLASS_TITLEBAR
 GTK_STYLE_REGION_COLUMN
 GTK_STYLE_REGION_COLUMN_HEADER
 GTK_STYLE_REGION_ROW
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h
index be8a0dc..53aaae9 100644
--- a/gtk/gtkstylecontext.h
+++ b/gtk/gtkstylecontext.h
@@ -735,6 +735,13 @@ struct _GtkStyleContextClass
  */
 #define GTK_STYLE_CLASS_INSERTION_CURSOR "insertion-cursor"
 
+/**
+ * GTK_STYLE_CLASS_TITLEBAR:
+ *
+ * A CSS class used when rendering a titlebar in a toplevel
+ * window.
+ */
+#define GTK_STYLE_CLASS_TITLEBAR "titlebar"
 
 /* Predefined set of widget regions */
 
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 1210acf..5ea9b1d 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5258,7 +5258,7 @@ create_decoration (GtkWidget *widget)
                     "vpadding", 0,
                     NULL);
       context = gtk_widget_get_style_context (priv->title_box);
-      gtk_style_context_add_class (context, "titlebar");
+      gtk_style_context_add_class (context, GTK_STYLE_CLASS_TITLEBAR);
       gtk_widget_set_parent (priv->title_box, widget);
 
       title = g_markup_printf_escaped ("<b>%s</b>",


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