gtk-demo: Fix the decorative overlay example

The decorations are appearing as 16x16, which is not
the intention. Use a GtkPicture instead.
This commit is contained in:
Matthias Clasen
2019-02-21 19:38:58 -05:00
parent b70cd64d6d
commit d291dff0ac

View File

@@ -64,13 +64,13 @@ do_overlay2 (GtkWidget *do_widget)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
image = gtk_image_new_from_resource ("/overlay2/decor1.png");
image = gtk_picture_new_for_resource ("/overlay2/decor1.png");
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), image);
gtk_overlay_set_overlay_pass_through (GTK_OVERLAY (overlay), image, TRUE);
gtk_widget_set_halign (image, GTK_ALIGN_START);
gtk_widget_set_valign (image, GTK_ALIGN_START);
image = gtk_image_new_from_resource ("/overlay2/decor2.png");
image = gtk_picture_new_for_resource ("/overlay2/decor2.png");
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), image);
gtk_overlay_set_overlay_pass_through (GTK_OVERLAY (overlay), image, TRUE);
gtk_widget_set_halign (image, GTK_ALIGN_END);