This commit is contained in:
Kovid Goyal 2016-09-26 13:27:25 +05:30
parent 6aefa3721a
commit e3300f3123

View File

@ -55,7 +55,7 @@ def create_layout_panel(container):
E.tr(E.td(_('In landscape orientation:')), E.td(E.input(type='number', name='landscape', min='0', step='1', max='20', value=str(cps.landscape)))), E.tr(E.td(_('In landscape orientation:')), E.td(E.input(type='number', name='landscape', min='0', step='1', max='20', value=str(cps.landscape)))),
)) ))
sec(_('Change the maximum screen area used to display text. A value of zero means that all screen area is used.')) sec(_('Change the maximum screen area used to display text. A value of zero means that all available screen area is used.'))
container.appendChild(E.table(style='margin: 1ex 1rem', id=TEXT_AREA, container.appendChild(E.table(style='margin: 1ex 1rem', id=TEXT_AREA,
E.tr(E.td(_('Max. width:')), E.td(E.input(type='number', name='width', min='0', step='10', value=str(sd.get('max_text_width'))))), E.tr(E.td(_('Max. width:')), E.td(E.input(type='number', name='width', min='0', step='10', value=str(sd.get('max_text_width'))))),
E.tr(E.td(_('Max. height:')), E.td(E.input(type='number', name='height', min='0', step='10', value=str(sd.get('max_text_height'))))), E.tr(E.td(_('Max. height:')), E.td(E.input(type='number', name='height', min='0', step='10', value=str(sd.get('max_text_height'))))),
@ -96,7 +96,7 @@ def commit_layout(onchange, container):
was_changed = True was_changed = True
for which in ('width', 'height'): for which in ('width', 'height'):
try: try:
val = int(element(TEXT_AREA, 'input[name={}]'.format(which))) val = int(element(TEXT_AREA, 'input[name={}]'.format(which)).value)
except: except:
continue continue
if val is not sd.get('max_text_' + which): if val is not sd.get('max_text_' + which):