From 77608c5403aafe3a334199851ecd9f83172e3422 Mon Sep 17 00:00:00 2001 From: mozdi <39409442+mozdi@users.noreply.github.com> Date: Thu, 10 Aug 2023 12:07:47 +0200 Subject: [PATCH] Added size-Option See https://github.com/pibooth/pibooth-qrcode/issues/20 --- pibooth_qrcode.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pibooth_qrcode.py b/pibooth_qrcode.py index 24e85e6..82ebea0 100644 --- a/pibooth_qrcode.py +++ b/pibooth_qrcode.py @@ -43,7 +43,8 @@ def pibooth_configure(cfg): cfg.add_option(SECTION, 'print_location', "bottomright", "Location on 'print' state: {}".format(', '.join(LOCATIONS)), "Location on print screen", LOCATIONS) - + cfg.add_option(SECTION, 'size', "4", + "Size of QR code", "Size", "4") def get_qrcode_rect(win_rect, qrcode_image, location, offset): sublocation = '' @@ -139,8 +140,8 @@ def state_processing_exit(cfg, app): raise ModuleNotFoundError("No module named 'qrcode'") qr = qrcode.QRCode(version=1, error_correction=qrcode.constants.ERROR_CORRECT_L, - box_size=3, - border=1) + box_size=cfg.gettyped("QRCODE", 'size'), + border=4) url_vars = {'picture': app.picture_filename, 'count': app.count,