background: Fix thumbnail size on hidpi

Use GIcon GtkImage API instead lf GdkPixbuf. The latter treats pixbufs as
always being in 1x scale and upscales them to compensate, while in our case
they are pre-scaled.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/787
This commit is contained in:
Alexander Mikhaylenko 2021-02-26 12:46:34 +05:00 committed by Georges Basile Stavracas Neto
parent 9fc0a4c2b1
commit 13ffacb083

View file

@ -105,7 +105,7 @@ create_widget_func (gpointer model_item,
bg_source_get_thumbnail_width (source),
bg_source_get_thumbnail_height (source),
bg_source_get_scale_factor (source));
image = gtk_image_new_from_pixbuf (pixbuf);
image = gtk_image_new_from_gicon (G_ICON (pixbuf), GTK_ICON_SIZE_DIALOG);
gtk_widget_show (image);
icon = gtk_image_new_from_icon_name("slideshow-emblem", GTK_ICON_SIZE_BUTTON);