From 2936b09a63728c9ac0c1e92786d37fec673da8d2 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Sun, 12 Mar 2023 17:38:49 +0100 Subject: [PATCH] change OMEMO QR code `0` bits to 'space' This makes the generated QR code a lot better recognizable in my case. Signed-off-by: Steffen Jaeckel --- src/ui/console.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ui/console.c b/src/ui/console.c index b1720415..bab8e17c 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -915,10 +915,12 @@ cons_show_qrcode(const char* const text) strcat(pad, "\u2588\u2588"); } - win_println(console, THEME_DEFAULT, "", pad); + win_println(console, THEME_DEFAULT, "", ""); + win_println(console, THEME_DEFAULT, "", ""); + win_println(console, THEME_DEFAULT, "", "%s", pad); for (size_t y = 0; y < width; y += ZOOM_SIZE) { for (size_t x = 0; x < width; x += ZOOM_SIZE) { - strcat(buf, !(*data & 1) ? "\u2588\u2588" : "\u2800\u2800"); + strcat(buf, !(*data & 1) ? "\u2588\u2588" : " "); data++; } @@ -929,6 +931,8 @@ cons_show_qrcode(const char* const text) buf[0] = '\0'; } win_println(console, THEME_DEFAULT, "", "%s", pad); + win_println(console, THEME_DEFAULT, "", ""); + win_println(console, THEME_DEFAULT, "", ""); free(pad); free(buf);