[gnome-control-center/wip/exalm/bg] background: Fix thumbnail size on hidpi
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/exalm/bg] background: Fix thumbnail size on hidpi
- Date: Fri, 26 Feb 2021 07:48:41 +0000 (UTC)
commit c5864c4c4ccbafb20b1e17a46d2b1694e2a47246
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]