From c813a6d2405980c71450cefa10abdf11fab8e995 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sat, 28 Jan 2023 00:51:31 +0100 Subject: Fix QR code being displayed way too small fixes #1278 --- plugins/omemo/data/contact_details_dialog.ui | 4 +++- plugins/omemo/src/ui/contact_details_dialog.vala | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'plugins/omemo') diff --git a/plugins/omemo/data/contact_details_dialog.ui b/plugins/omemo/data/contact_details_dialog.ui index 9b4042cf..715dbd33 100644 --- a/plugins/omemo/data/contact_details_dialog.ui +++ b/plugins/omemo/data/contact_details_dialog.ui @@ -241,7 +241,9 @@ 10 10 - + + False + diff --git a/plugins/omemo/src/ui/contact_details_dialog.vala b/plugins/omemo/src/ui/contact_details_dialog.vala index 2de28572..61fae286 100644 --- a/plugins/omemo/src/ui/contact_details_dialog.vala +++ b/plugins/omemo/src/ui/contact_details_dialog.vala @@ -38,7 +38,7 @@ public class ContactDetailsDialog : Gtk.Dialog { [GtkChild] private unowned Switch auto_accept_switch; [GtkChild] private unowned Button copy_button; [GtkChild] private unowned MenuButton show_qrcode_button; - [GtkChild] private unowned Image qrcode_image; + [GtkChild] private unowned Picture qrcode_picture; [GtkChild] private unowned Popover qrcode_popover; private ArrayList new_keys_listbox_children = new ArrayList(); @@ -105,10 +105,10 @@ public class ContactDetailsDialog : Gtk.Dialog { const int QUIET_ZONE_MODULES = 4; // MUST be at least 4 const int MODULE_SIZE_PX = 4; // arbitrary var qr_paintable = new QRcode(iri, 2) - .to_paintable(MODULE_SIZE_PX * qrcode_image.scale_factor); - qrcode_image.paintable = qr_paintable; - qrcode_image.margin_top = qrcode_image.margin_end = - qrcode_image.margin_bottom = qrcode_image.margin_start = QUIET_ZONE_MODULES*MODULE_SIZE_PX; + .to_paintable(MODULE_SIZE_PX * qrcode_picture.scale_factor); + qrcode_picture.paintable = qr_paintable; + qrcode_picture.margin_top = qrcode_picture.margin_end = + qrcode_picture.margin_bottom = qrcode_picture.margin_start = QUIET_ZONE_MODULES * MODULE_SIZE_PX; qrcode_popover.add_css_class("qrcode-container"); show_qrcode_button.popover = qrcode_popover; -- cgit v1.2.3-70-g09d2