about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorSteffen Jaeckel <jaeckel-floss@eyet-services.de>2023-03-12 17:38:49 +0100
committerSteffen Jaeckel <jaeckel-floss@eyet-services.de>2023-03-12 17:39:57 +0100
commit2936b09a63728c9ac0c1e92786d37fec673da8d2 (patch)
treebab370288daa0ec39923f61697f9f82787246755 /src
parent091987db946895cb415d6da726cc1fa7c445c6d2 (diff)
downloadprofani-tty-2936b09a63728c9ac0c1e92786d37fec673da8d2.tar.gz
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 <jaeckel-floss@eyet-services.de>
Diffstat (limited to 'src')
-rw-r--r--src/ui/console.c8
1 files 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);
a> 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207