[gtk/overlay-cleanup: 2/3] gtk-demo: Fix the decorative overlay example
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/overlay-cleanup: 2/3] gtk-demo: Fix the decorative overlay example
- Date: Fri, 22 Feb 2019 00:41:16 +0000 (UTC)
commit d291dff0ac610f4c4c06f0fbacffaa76895ddd88
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Feb 21 19:38:58 2019 -0500
gtk-demo: Fix the decorative overlay example
The decorations are appearing as 16x16, which is not
the intention. Use a GtkPicture instead.
demos/gtk-demo/overlay2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/demos/gtk-demo/overlay2.c b/demos/gtk-demo/overlay2.c
index eeef1b699b..0145d4a740 100644
--- a/demos/gtk-demo/overlay2.c
+++ b/demos/gtk-demo/overlay2.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]