Commit de423761 authored by William Jon McCann's avatar William Jon McCann

Add GTK_STYLE_CLASS_SUGGESTED_ACTION

parent 648511ed
......@@ -342,7 +342,7 @@ add_action_widgets (GtkAssistant *assistant)
if (has_default)
{
gtk_widget_grab_default (child);
gtk_style_context_add_class (gtk_widget_get_style_context (child), "suggested-action");
gtk_style_context_add_class (gtk_widget_get_style_context (child), GTK_STYLE_CLASS_SUGGESTED_ACTION);
}
}
g_list_free (children);
......
......@@ -425,7 +425,7 @@ add_action_widgets (GtkDialog *dialog)
if (has_default)
{
gtk_widget_grab_default (child);
gtk_style_context_add_class (gtk_widget_get_style_context (child), "suggested-action");
gtk_style_context_add_class (gtk_widget_get_style_context (child), GTK_STYLE_CLASS_SUGGESTED_ACTION);
}
}
g_list_free (children);
......@@ -1105,7 +1105,7 @@ gtk_dialog_set_default_response (GtkDialog *dialog,
{
gtk_widget_grab_default (widget);
if (dialog->priv->constructed && dialog->priv->use_header_bar == 1)
gtk_style_context_add_class (gtk_widget_get_style_context (widget), "suggested-action");
gtk_style_context_add_class (gtk_widget_get_style_context (widget), GTK_STYLE_CLASS_SUGGESTED_ACTION);
}
tmp_list = g_list_next (tmp_list);
......
......@@ -765,6 +765,16 @@ struct _GtkStyleContextClass
*/
#define GTK_STYLE_CLASS_NEEDS_ATTENTION "needs-attention"
/**
* GTK_STYLE_CLASS_SUGGESTED_ACTION:
*
* A CSS class used when an action (usually a button) is the
* primary suggested action in a specific context.
*
* Since: 3.12
*/
#define GTK_STYLE_CLASS_SUGGESTED_ACTION "suggested-action"
/* Predefined set of widget regions */
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment