make a commit comment a code comment. also add a new line so it is visually better to seperate logic and return
This commit is contained in:
parent
f9ecc9e456
commit
c9e30fd612
1 changed files with 2 additions and 0 deletions
|
@ -412,9 +412,11 @@ def get_scaled_pixbuf(pixbuf, type):
|
||||||
# resize to a width / height for the avatar not to have distortion
|
# resize to a width / height for the avatar not to have distortion
|
||||||
# (keep aspect ratio)
|
# (keep aspect ratio)
|
||||||
|
|
||||||
|
# don't make avatars bigger than they are
|
||||||
if pixbuf.get_width() < gajim.config.get(type + '_avatar_width') and \
|
if pixbuf.get_width() < gajim.config.get(type + '_avatar_width') and \
|
||||||
pixbuf.get_height() < gajim.config.get(type + '_avatar_height'):
|
pixbuf.get_height() < gajim.config.get(type + '_avatar_height'):
|
||||||
return pixbuf # we don't want to make avatar bigger
|
return pixbuf # we don't want to make avatar bigger
|
||||||
|
|
||||||
ratio = float(pixbuf.get_width()) / float(pixbuf.get_height())
|
ratio = float(pixbuf.get_width()) / float(pixbuf.get_height())
|
||||||
if ratio > 1:
|
if ratio > 1:
|
||||||
w = gajim.config.get(type + '_avatar_width')
|
w = gajim.config.get(type + '_avatar_width')
|
||||||
|
|
Loading…
Add table
Reference in a new issue