[gtk+] Statusbar: add 'statusbar' style class
- From: Lapo Calamandrei <lapo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Statusbar: add 'statusbar' style class
- Date: Tue, 11 Nov 2014 16:23:34 +0000 (UTC)
commit 4aca13e39e2b1cd2ccfd8aa9dc5c11b5d9e36baf
Author: Lapo Calamandrei <calamandrei gmail com>
Date: Tue Nov 11 17:23:04 2014 +0100
Statusbar: add 'statusbar' style class
docs/reference/gtk/gtk3-sections.txt | 1 +
gtk/gtkstatusbar.c | 4 ++++
gtk/gtkstylecontext.h | 11 +++++++++++
3 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index 9b3f52c..4543494 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -6046,6 +6046,7 @@ GTK_STYLE_CLASS_SIDEBAR
GTK_STYLE_CLASS_SLIDER
GTK_STYLE_CLASS_SPINBUTTON
GTK_STYLE_CLASS_SPINNER
+GTK_STYLE_CLASS_STATUSBAR
GTK_STYLE_CLASS_SUBTITLE
GTK_STYLE_CLASS_SUGGESTED_ACTION
GTK_STYLE_CLASS_TITLE
diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c
index 18f974e..9cb3106 100644
--- a/gtk/gtkstatusbar.c
+++ b/gtk/gtkstatusbar.c
@@ -183,10 +183,14 @@ gtk_statusbar_init (GtkStatusbar *statusbar)
{
GtkStatusbarPrivate *priv;
GtkShadowType shadow_type;
+ GtkStyleContext *context;
statusbar->priv = gtk_statusbar_get_instance_private (statusbar);
priv = statusbar->priv;
+ context = gtk_widget_get_style_context (GTK_WIDGET (statusbar));
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_STATUSBAR);
+
priv->seq_context_id = 1;
priv->seq_message_id = 1;
priv->messages = NULL;
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h
index 8052a04..75930b8 100644
--- a/gtk/gtkstylecontext.h
+++ b/gtk/gtkstylecontext.h
@@ -355,6 +355,17 @@ struct _GtkStyleContextClass
#define GTK_STYLE_CLASS_INLINE_TOOLBAR "inline-toolbar"
/**
+ * GTK_STYLE_CLASS_STATUSBAR:
+ *
+ * A CSS class to match statusbars.
+ *
+ * This is used in #GtkStatusbar.
+ *
+ * Since: 3.16
+ */
+#define GTK_STYLE_CLASS_STATUSBAR "statusbar"
+
+/**
* GTK_STYLE_CLASS_RADIO:
*
* A CSS class to match radio buttons.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]