avatar is now 200x200 max in vcar window. Fixes #1582
This commit is contained in:
parent
549872473c
commit
9d045fc69b
|
@ -166,6 +166,8 @@ class Config:
|
|||
'roster_avatar_height': [opt_int, 32],
|
||||
'tooltip_avatar_width': [opt_int, 125],
|
||||
'tooltip_avatar_height': [opt_int, 125],
|
||||
'vcard_avatar_width': [opt_int, 200],
|
||||
'vcard_avatar_height': [opt_int, 200],
|
||||
'notification_position_x': [opt_int, -1],
|
||||
'notification_position_y': [opt_int, -1],
|
||||
'notification_avatar_width': [opt_int, 48],
|
||||
|
|
|
@ -245,6 +245,8 @@ class VcardWindow:
|
|||
fd = open(path_to_file, 'rb')
|
||||
data = fd.read()
|
||||
pixbuf = gtkgui_helpers.get_pixbuf_from_data(data)
|
||||
# rescale it
|
||||
pixbuf = gtkgui_helpers.get_scaled_pixbuf(pixbuf, 'vcard')
|
||||
image = self.xml.get_widget('PHOTO_image')
|
||||
image.set_from_pixbuf(pixbuf)
|
||||
self.avatar_encoded = base64.encodestring(data)
|
||||
|
@ -263,6 +265,7 @@ class VcardWindow:
|
|||
pixbuf, self.avatar_encoded, self.avatar_mime_type = \
|
||||
get_avatar_pixbuf_encoded_mime(vcard[i])
|
||||
image = self.xml.get_widget('PHOTO_image')
|
||||
pixbuf = gtkgui_helpers.get_scaled_pixbuf(pixbuf, 'vcard')
|
||||
image.set_from_pixbuf(pixbuf)
|
||||
continue
|
||||
if i == 'ADR' or i == 'TEL' or i == 'EMAIL':
|
||||
|
|
Loading…
Reference in New Issue