GtkPicture not displayed inside GtkFixed

I am displaying a GtkPicture inside a GtkFixed layout container but the picture is not shown. If i remove the GtkFixed and replace it with a GtkBox then the picture is shown. But i absolutely need to use GtkFixed. Is this a bug or am i missing a step?

Here’s the code i used to test and am using gtk4.2.0:

layout = gtk_fixed_new ();
gtk_window_set_child (GTK_WINDOW (window), layout);

picture = gtk_picture_new_for_filename(“picture.png”);
gtk_fixed_put (GTK_FIXED (layout), picture, 0, 0);
gtk_widget_show (window);

Ok got it to work. After creating the picture with gtk_picture_new_for_filename, i set the size of the picture explicitly with gtk_widget_set_size_request and then add to gtkfixed and it works.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.