Skip to content

Commit

Permalink
Added size-Option
Browse files Browse the repository at this point in the history
  • Loading branch information
mozdi authored Aug 10, 2023
1 parent 3a07aae commit 77608c5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pibooth_qrcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 77608c5

Please sign in to comment.