mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 04:08:01 +02: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.
This commit is contained in:
parent
9820e791d1
commit
d9b06a95c9
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