mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 04:30:09 +01:00
merge: branch 'wip/sadiq/qr-border'
libnmc-base/utils: Improve qr code bottom border https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1736
This commit is contained in:
commit
e85b76b736
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