diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt index 9b3f52c6c0..4543494987 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 18f974e6bb..9cb3106670 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 8052a04dad..75930b873b 100644 --- a/gtk/gtkstylecontext.h +++ b/gtk/gtkstylecontext.h @@ -354,6 +354,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: *