mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-31 21:50:11 +01:00
libnmc-base/utils: Improve qr code bottom border
The bottom border of the generated QR code had a different thickness
compared to other borders.
Improve it by using Upper Half Block so that all borders have similar
thickness.
(cherry picked from commit d9b06a95c9)
This commit is contained in:
parent
885bc80d29
commit
cef00ac0f7
1 changed files with 3 additions and 0 deletions
|
|
@ -712,6 +712,9 @@ nmc_print_qrcode(const char *str)
|
|||
bool bottom = qrcodegen_getModule(qrcode, x, y + 1);
|
||||
if (top) {
|
||||
g_print(bottom ? " " : "\u2584");
|
||||
} else if (y > size) {
|
||||
/* Print the last line (the bottom QR border) in light gray, no bg color */
|
||||
g_print("\033[0;37m\u2580");
|
||||
} else {
|
||||
g_print(bottom ? "\u2580" : "\u2588");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue