mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-16 21:50:34 +00:00
Add GTK_STYLE_CLASS_SUGGESTED_ACTION
This commit is contained in:
parent
648511ed44
commit
de42376122
@ -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 */
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user