aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-icon-factory.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-icon-factory.c')
-rw-r--r--e-util/e-icon-factory.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/e-util/e-icon-factory.c b/e-util/e-icon-factory.c
index 36008613be..1f24471e11 100644
--- a/e-util/e-icon-factory.c
+++ b/e-util/e-icon-factory.c
@@ -159,8 +159,12 @@ load_icon (const char *icon_key, const char *icon_name, int size, int scale)
g_free (filename);
if (unscaled != NULL) {
- pixbuf = gdk_pixbuf_scale_simple (unscaled, size, size, GDK_INTERP_BILINEAR);
- g_object_unref (unscaled);
+ if(gdk_pixbuf_get_width(unscaled) != size || gdk_pixbuf_get_height(unscaled) != size)
+ {
+ pixbuf = gdk_pixbuf_scale_simple (unscaled, size, size, GDK_INTERP_BILINEAR);
+ g_object_unref (unscaled);
+ } else
+ pixbuf = unscaled;
} else {
pixbuf = NULL;
}