summaryrefslogtreecommitdiff
path: root/gtk/gtkcellrendererpixbuf.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2020-02-05 15:47:23 +0100
committerAlexander Larsson <alexl@redhat.com>2020-02-06 09:38:25 +0100
commitb529f778270d01156e46ba9e012bf0fd4288e680 (patch)
tree8ba8e32de4dbbb6b05f8117c038b85a6908dce79 /gtk/gtkcellrendererpixbuf.c
parent021aaef824283644a02938e04d4c1958cdb0a389 (diff)
downloadgtk+-b529f778270d01156e46ba9e012bf0fd4288e680.tar.gz
IconTheme: Simplify icon scaling
We had a pretty complex setup where we tried to avoid scaling up themes from dirs that specified a size. However, not only was it very complex, but it didn't quite work with window scales, because when using e.g. a size 32 directory for 16@2x the dir size is wrong anyway. Additionally it turns out most code either picks an existing icon size, or uses the FORCE_SIZE flags, so it doesn't seem like a useful behaviour. This change drops the FORCE_SIZE flags, and always scales icons. Additionally it moves the scaling of the icon to rendering, which seems more modern, and allows us to (later) share icons loaded for different sizes that happened to use the same source file (at different scales). Note that this changes the behaviour of gtk_icon_paintable_download_texture() is it now returns the unscaled source icon. However, ignore thats, as I plan to remove this function and replace it with a way to render a paintable to a cairo-surface instead.
Diffstat (limited to 'gtk/gtkcellrendererpixbuf.c')
-rw-r--r--gtk/gtkcellrendererpixbuf.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/gtk/gtkcellrendererpixbuf.c b/gtk/gtkcellrendererpixbuf.c
index e89a5f8ba3..bb240bae91 100644
--- a/gtk/gtkcellrendererpixbuf.c
+++ b/gtk/gtkcellrendererpixbuf.c
@@ -403,7 +403,6 @@ create_icon_helper (GtkCellRendererPixbuf *cellpixbuf,
icon_helper = gtk_icon_helper_new (gtk_style_context_get_node (gtk_widget_get_style_context (widget)),
widget);
_gtk_icon_helper_set_use_fallback (icon_helper, TRUE);
- _gtk_icon_helper_set_force_scale_pixbuf (icon_helper, TRUE);
_gtk_icon_helper_set_definition (icon_helper, priv->image_def);
return icon_helper;