mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 06:51:10 +00:00
Add the "text-button" style to button created with gtk_button_new_with_{label,mnemonic}
https://bugzilla.gnome.org/show_bug.cgi?id=706220
This commit is contained in:
parent
a9ea814597
commit
8d7bab7d7b
@ -1294,7 +1294,14 @@ gtk_button_construct_child (GtkButton *button)
|
||||
GtkWidget*
|
||||
gtk_button_new_with_label (const gchar *label)
|
||||
{
|
||||
return g_object_new (GTK_TYPE_BUTTON, "label", label, NULL);
|
||||
GtkStyleContext *context;
|
||||
GtkWidget *button;
|
||||
|
||||
button = g_object_new (GTK_TYPE_BUTTON, "label", label, NULL);
|
||||
context = gtk_widget_get_style_context (button);
|
||||
gtk_style_context_add_class (context, "text-button");
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1375,7 +1382,14 @@ gtk_button_new_from_stock (const gchar *stock_id)
|
||||
GtkWidget*
|
||||
gtk_button_new_with_mnemonic (const gchar *label)
|
||||
{
|
||||
return g_object_new (GTK_TYPE_BUTTON, "label", label, "use-underline", TRUE, NULL);
|
||||
GtkStyleContext *context;
|
||||
GtkWidget *button;
|
||||
|
||||
button = g_object_new (GTK_TYPE_BUTTON, "label", label, "use-underline", TRUE, NULL);
|
||||
context = gtk_widget_get_style_context (button);
|
||||
gtk_style_context_add_class (context, "text-button");
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user