From 2cc6a3ee5cf7fe710f612f9e7e42803fed31164b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 8 Jul 2018 21:48:17 +0200 Subject: widget factory: Use GtkPicture for background selection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Showing those background images as 16×16 icons doesn't look very nice. --- demos/widget-factory/widget-factory.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c index 836eae77af..d0e2cafbb1 100644 --- a/demos/widget-factory/widget-factory.c +++ b/demos/widget-factory/widget-factory.c @@ -966,8 +966,8 @@ background_loaded_cb (GObject *source, return; } - child = gtk_image_new_from_pixbuf (pixbuf); - gtk_widget_show (child); + child = gtk_picture_new_for_pixbuf (pixbuf); + gtk_widget_set_size_request (child, 110, 70); gtk_flow_box_insert (GTK_FLOW_BOX (bd->flowbox), child, -1); child = gtk_widget_get_parent (child); g_object_set_data_full (G_OBJECT (child), "filename", bd->filename, g_free); @@ -995,8 +995,7 @@ populate_flowbox (GtkWidget *flowbox) pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 110, 70); gdk_pixbuf_fill (pixbuf, 0xffffffff); - child = gtk_image_new_from_pixbuf (pixbuf); - gtk_widget_show (child); + child = gtk_picture_new_for_pixbuf (pixbuf); gtk_flow_box_insert (GTK_FLOW_BOX (flowbox), child, -1); location = "/usr/share/backgrounds/gnome"; -- cgit v1.2.1