diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py index 6b8ccd317d6228141c1f9c65b1e3fc7c99ffde1e..75a87255504a821133c951745283cd1335af3d34 100644 --- a/src/gtkgui_helpers.py +++ b/src/gtkgui_helpers.py @@ -412,9 +412,11 @@ def get_scaled_pixbuf(pixbuf, type): # resize to a width / height for the avatar not to have distortion # (keep aspect ratio) + # don't make avatars bigger than they are if pixbuf.get_width() < gajim.config.get(type + '_avatar_width') and \ pixbuf.get_height() < gajim.config.get(type + '_avatar_height'): return pixbuf # we don't want to make avatar bigger + ratio = float(pixbuf.get_width()) / float(pixbuf.get_height()) if ratio > 1: w = gajim.config.get(type + '_avatar_width')