diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/omemo/src/contact_details_dialog.vala | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/plugins/omemo/src/contact_details_dialog.vala b/plugins/omemo/src/contact_details_dialog.vala index 1865c5f0..62d755d9 100644 --- a/plugins/omemo/src/contact_details_dialog.vala +++ b/plugins/omemo/src/contact_details_dialog.vala @@ -58,8 +58,19 @@ public class ContactDetailsDialog : Gtk.Dialog { copy_button.clicked.connect(() => {Clipboard.get_default(get_display()).set_text(fingerprint, fingerprint.length);}); int sid = plugin.db.identity.row_with(plugin.db.identity.account_id, account.id)[plugin.db.identity.device_id]; - Pixbuf pixbuf = new QRcode(@"xmpp:$(account.bare_jid)?omemo-sid-$(sid)=$(fingerprint)", 2).to_pixbuf(); - pixbuf = pixbuf.scale_simple(150, 150, InterpType.NEAREST); + Pixbuf qr_pixbuf = new QRcode(@"xmpp:$(account.bare_jid)?omemo-sid-$(sid)=$(fingerprint)", 2).to_pixbuf(); + qr_pixbuf = qr_pixbuf.scale_simple(150, 150, InterpType.NEAREST); + + Pixbuf pixbuf = new Pixbuf( + qr_pixbuf.colorspace, + qr_pixbuf.has_alpha, + qr_pixbuf.bits_per_sample, + 170, + 170 + ); + pixbuf.fill(uint32.MAX); + qr_pixbuf.copy_area(0, 0, 150, 150, pixbuf, 10, 10); + qrcode_image.set_from_pixbuf(pixbuf); show_qrcode_button.clicked.connect(qrcode_popover.popup); } |