mirror of
https://github.com/pklaus/brother_ql_web.git
synced 2024-05-25 11:56:53 +03:00
state margin_{top,bottom,left,right} in %
This commit is contained in:
parent
7935fd0940
commit
dc79624e1d
|
@ -67,10 +67,10 @@ def get_label_context(request):
|
||||||
'threshold': int(d.get('threshold', 70)),
|
'threshold': int(d.get('threshold', 70)),
|
||||||
'align': d.get('align', 'center'),
|
'align': d.get('align', 'center'),
|
||||||
'orientation': d.get('orientation', 'standard'),
|
'orientation': d.get('orientation', 'standard'),
|
||||||
'margin_top': float(d.get('margin_top', 0.24)),
|
'margin_top': float(d.get('margin_top', 24))/100.,
|
||||||
'margin_bottom': float(d.get('margin_bottom', 0.45)),
|
'margin_bottom': float(d.get('margin_bottom', 45))/100.,
|
||||||
'margin_left': float(d.get('margin_left', 0.35)),
|
'margin_left': float(d.get('margin_left', 35))/100.,
|
||||||
'margin_right': float(d.get('margin_right', 0.35)),
|
'margin_right': float(d.get('margin_right', 35))/100.,
|
||||||
}
|
}
|
||||||
context['margin_top'] = int(context['font_size']*context['margin_top'])
|
context['margin_top'] = int(context['font_size']*context['margin_top'])
|
||||||
context['margin_bottom'] = int(context['font_size']*context['margin_bottom'])
|
context['margin_bottom'] = int(context['font_size']*context['margin_bottom'])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user