[gnome-control-center/wip/exalm/bg: 8/8] background: Fix thumbnail size on hidpi
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/exalm/bg: 8/8] background: Fix thumbnail size on hidpi
- Date: Thu, 4 Mar 2021 13:29:28 +0000 (UTC)
commit 13ffacb0836e35576791e16824ec69827ef3ca88
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Feb 26 12:46:34 2021 +0500
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
panels/background/cc-background-chooser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/panels/background/cc-background-chooser.c b/panels/background/cc-background-chooser.c
index de201b8da..6c8f56136 100644
--- a/panels/background/cc-background-chooser.c
+++ b/panels/background/cc-background-chooser.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]