mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Allow ticket QR code colour to be configured (#4726)
* Allow ticket QR code colour to be configured This commit introduces a feature enabling users to customise the QR code colour in the ticket editor. * Remove redundant argument from `Dict.get` call Co-authored-by: Raphael Michel <mail@raphaelmichel.de> --------- Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
This commit is contained in:
@@ -822,6 +822,10 @@ class Renderer:
|
||||
kwargs = {}
|
||||
if o.get('nowhitespace', False):
|
||||
kwargs['barBorder'] = 0
|
||||
|
||||
if o.get('color'):
|
||||
kwargs['barFillColor'] = Color(o['color'][0] / 255, o['color'][1] / 255, o['color'][2] / 255)
|
||||
|
||||
qrw = QrCodeWidget(content, barLevel=level, barHeight=reqs, barWidth=reqs, **kwargs)
|
||||
d = Drawing(reqs, reqs)
|
||||
d.add(qrw)
|
||||
|
||||
Reference in New Issue
Block a user