summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/gtkbutton.c5
-rw-r--r--gtk/gtkmodelbutton.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 059853106a..9e9a15a422 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -927,7 +927,10 @@ gtk_button_set_icon_name (GtkButton *button,
if (priv->child_type != ICON_CHILD || priv->child == NULL)
{
- GtkWidget *child = gtk_image_new_from_icon_name (icon_name);
+ GtkWidget *child = g_object_new (GTK_TYPE_IMAGE,
+ "accessible-role", GTK_ACCESSIBLE_ROLE_PRESENTATION,
+ "icon-name", icon_name,
+ NULL);
gtk_button_set_child (GTK_BUTTON (button), child);
gtk_widget_set_valign (child, GTK_ALIGN_CENTER);
gtk_widget_remove_css_class (GTK_WIDGET (button), "text-button");
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index c6e3d04f10..9efed319aa 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -648,7 +648,10 @@ gtk_model_button_set_icon (GtkModelButton *self,
{
if (!self->image && icon)
{
- self->image = gtk_image_new_from_gicon (icon);
+ self->image = g_object_new (GTK_TYPE_IMAGE,
+ "accessible-role", GTK_ACCESSIBLE_ROLE_PRESENTATION,
+ "gicon", icon,
+ NULL);
gtk_widget_insert_before (self->image, GTK_WIDGET (self), self->label);
}
else if (self->image && !icon)