diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2015-02-22 17:53:18 -0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2015-02-23 09:56:06 -0800 |
commit | eddaf01676d3f6f28ca2609146be03a3dc9fd0b8 (patch) | |
tree | 69df09cfa32602d87cdef10c4ae8067ebc8a7b0d /gtk/gtkicontheme.c | |
parent | acd72ffabe88ae4078e1cc1c4c2377c6ea5aac5c (diff) | |
download | gtk+-eddaf01676d3f6f28ca2609146be03a3dc9fd0b8.tar.gz |
icontheme: use desired size instead of negative for DIR_UNTHEMED SVGs
When loading SVGs from ICON_THEME_DIR_UNTHEMED GtkIconInfos,
such as those created for a GLoadableIcon, the size of the pixbuf to
load is set as a product of icon_info->scale.
But a few lines above, icon_info->scale is set to -1 for
ICON_THEME_DIR_UNTHEMED GtkIconInfos, so we'll end up always passing a
negative size to the GdkPixbuf loader, which is interpreted as the
nominal size of the image file.
Instead load the SVG at the desired scaled size in that case.
This fixes blurry icon in the notification panel in gnome-shell.
https://bugzilla.gnome.org/show_bug.cgi?id=744991
Diffstat (limited to 'gtk/gtkicontheme.c')
-rw-r--r-- | gtk/gtkicontheme.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 2f45f63ce1..7e2f8ed42b 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -3859,7 +3859,7 @@ icon_info_ensure_scale_and_pixbuf (GtkIconInfo *icon_info) { gint size; - if (icon_info->forced_size) + if (icon_info->forced_size || icon_info->dir_type == ICON_THEME_DIR_UNTHEMED) size = scaled_desired_size; else size = icon_info->dir_size * dir_scale * icon_info->scale; @@ -3889,7 +3889,7 @@ icon_info_ensure_scale_and_pixbuf (GtkIconInfo *icon_info) { gint size; - if (icon_info->forced_size) + if (icon_info->forced_size || icon_info->dir_type == ICON_THEME_DIR_UNTHEMED) size = scaled_desired_size; else size = icon_info->dir_size * dir_scale * icon_info->scale; |