Philipp Hörist pushed to branch master at gajim / gajim
Commits:
-
47a6b828
by Philipp Hörist at 2022-10-19T23:33:09+02:00
2 changed files:
Changes:
| ... | ... | @@ -380,7 +380,11 @@ def get_pixbuf(self, |
| 380 | 380 | |
| 381 | 381 | surface = self.get_surface(
|
| 382 | 382 | contact, size, scale, show, default, transport_icon, style)
|
| 383 | - return Gdk.pixbuf_get_from_surface(surface, 0, 0, size, size)
|
|
| 383 | + return Gdk.pixbuf_get_from_surface(surface,
|
|
| 384 | + 0,
|
|
| 385 | + 0,
|
|
| 386 | + size * scale,
|
|
| 387 | + size * scale)
|
|
| 384 | 388 | |
| 385 | 389 | def get_surface(self,
|
| 386 | 390 | contact: Union[types.BareContact,
|
| ... | ... | @@ -413,8 +413,7 @@ def _get_avatar_for_notification(account: str, |
| 413 | 413 | size = AvatarSize.NOTIFICATION
|
| 414 | 414 | client = app.get_client(account)
|
| 415 | 415 | contact = client.get_module('Contacts').get_contact(jid)
|
| 416 | - avatar_surface = contact.get_avatar(size, scale)
|
|
| 417 | - pixbuf = Gdk.pixbuf_get_from_surface(avatar_surface, 0, 0, size, size)
|
|
| 416 | + pixbuf = contact.get_avatar(size, scale, pixbuf=True)
|
|
| 418 | 417 | assert pixbuf is not None
|
| 419 | 418 | return pixbuf
|
| 420 | 419 |