avatar in roster and chat window are not scale up when they are too small
When avatars where smaller than the *_avatar_height/width configured in Gajim, it tried to scale them up, and it looks very ugly with small avatars. So, here is a patch :
Index: gajim/src/gtkgui_helpers.py
===================================================================
--- gajim/src/gtkgui_helpers.py (revision 4525)
+++ gajim/src/gtkgui_helpers.py (working copy)
@@ -411,6 +411,11 @@
# resize to a width / height for the avatar not to have distortion
# (keep aspect ratio)
+
+ 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')