I know this question exists How to add an image to a button with GTK but gtk_button_set_image is deprecated in gtk4.
I know this question exists How to add an image to a button with GTK but gtk_button_set_image is deprecated in gtk4.
gtk_button_set_child (GTK_BUTTON (button), image); where button and image are GtkButton and GtkImage , respectivly .
Gtk.Box box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 5);
box.prepend(new Image.from_icon_name("media-playback-start"));
box.append(new Gtk.Label("Play"));
button.child = box;