mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Make the controls help page nicer
This commit is contained in:
parent
351bae75b0
commit
21f5fbdf1d
@ -60,7 +60,7 @@ def show_controls_help():
|
|||||||
|
|
||||||
def focus():
|
def focus():
|
||||||
if container.style.display is 'block':
|
if container.style.display is 'block':
|
||||||
container.lastChild.focus()
|
container.querySelector('input').focus()
|
||||||
window.setTimeout(focus, 10)
|
window.setTimeout(focus, 10)
|
||||||
|
|
||||||
if runtime.is_standalone_viewer:
|
if runtime.is_standalone_viewer:
|
||||||
@ -69,6 +69,8 @@ def show_controls_help():
|
|||||||
E.div(style='margin-top: 1rem'),
|
E.div(style='margin-top: 1rem'),
|
||||||
E.div(style='margin-top: 1rem'),
|
E.div(style='margin-top: 1rem'),
|
||||||
E.div(style='margin-top: 1rem'),
|
E.div(style='margin-top: 1rem'),
|
||||||
|
E.div(style='margin-top: 1rem'),
|
||||||
|
E.input(style='background: transparent; border-width: 0; outline: none', readonly='readonly'),
|
||||||
))
|
))
|
||||||
div = container.lastChild.firstChild
|
div = container.lastChild.firstChild
|
||||||
safe_set_inner_html(div, _('Welcome to the <b>calibre viewer</b>!'))
|
safe_set_inner_html(div, _('Welcome to the <b>calibre viewer</b>!'))
|
||||||
@ -76,7 +78,8 @@ def show_controls_help():
|
|||||||
safe_set_inner_html(div, _('Use the <b>PageUp/PageDn</b> or <b>Arrow keys</b> to turn pages'))
|
safe_set_inner_html(div, _('Use the <b>PageUp/PageDn</b> or <b>Arrow keys</b> to turn pages'))
|
||||||
div = div.nextSibling
|
div = div.nextSibling
|
||||||
safe_set_inner_html(div, _('Press the <b>Esc</b> key or <b>right click</b> to show the viewer controls'))
|
safe_set_inner_html(div, _('Press the <b>Esc</b> key or <b>right click</b> to show the viewer controls'))
|
||||||
container.appendChild(E.input(style='background: transparent; border-width: 0; outline: none'))
|
div = div.nextSibling
|
||||||
|
safe_set_inner_html(div, _('Press any key to continue…'))
|
||||||
focus()
|
focus()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user