mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Viewer: Fix typing values in font size adjust control not working
This commit is contained in:
parent
6efd7915ee
commit
c341ed4172
@ -94,6 +94,15 @@ def create_font_size_panel(container, close):
|
|||||||
set_quick_size(ev)
|
set_quick_size(ev)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
def set_size(ev):
|
||||||
|
newval = ev.currentTarget.value
|
||||||
|
try:
|
||||||
|
q = int(newval)
|
||||||
|
except:
|
||||||
|
return
|
||||||
|
if MIN_FONT_SIZE <= q <= MAX_FONT_SIZE:
|
||||||
|
set_quick_size(ev)
|
||||||
|
|
||||||
container.appendChild(E.div(
|
container.appendChild(E.div(
|
||||||
style='display: flex; margin-top: 1rem',
|
style='display: flex; margin-top: 1rem',
|
||||||
E.input(
|
E.input(
|
||||||
@ -102,7 +111,7 @@ def create_font_size_panel(container, close):
|
|||||||
),
|
),
|
||||||
|
|
||||||
E.span('\xa0', E.input(
|
E.span('\xa0', E.input(
|
||||||
value=f'{cfs}', type='text', oninput=set_quick_size, type='number', min=MIN_FONT_SIZE, max=MAX_FONT_SIZE,
|
value=f'{cfs}', oninput=set_size, type='number', min=MIN_FONT_SIZE + '', max=MAX_FONT_SIZE + '',
|
||||||
step='1', style='width: 3em',
|
step='1', style='width: 3em',
|
||||||
), '\xa0px')
|
), '\xa0px')
|
||||||
))
|
))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user