mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix #1926209 [[Enhancement - Viewer] Add Miscellous heading for option in preferences](https://bugs.launchpad.net/calibre/+bug/1926209)
This commit is contained in:
parent
9eecc783f0
commit
66bcc9efc8
@ -51,10 +51,10 @@ def create_scrolling_panel(container, apply_func, cancel_func):
|
|||||||
sd = get_session_data()
|
sd = get_session_data()
|
||||||
|
|
||||||
def cb(name, text):
|
def cb(name, text):
|
||||||
ans = E.input(type='checkbox', name=name)
|
ans = E.input(type='checkbox', name=name, style='margin-left: 0')
|
||||||
if sd.get(name):
|
if sd.get(name):
|
||||||
ans.checked = True
|
ans.checked = True
|
||||||
return E.div(style='margin-top:1ex', E.label(ans, '\xa0' + text))
|
return E.div(style='margin-top:1ex', E.label(ans, text))
|
||||||
|
|
||||||
def spinner(name, text, **kwargs):
|
def spinner(name, text, **kwargs):
|
||||||
ans = E.input(type='number', name=name, id=name)
|
ans = E.input(type='number', name=name, id=name)
|
||||||
@ -64,17 +64,18 @@ def create_scrolling_panel(container, apply_func, cancel_func):
|
|||||||
return E.label("for"=name, text), ans
|
return E.label("for"=name, text), ans
|
||||||
|
|
||||||
container.appendChild(E.div(style='margin-top:1ex', _('Control how scrolling works in paged mode')))
|
container.appendChild(E.div(style='margin-top:1ex', _('Control how scrolling works in paged mode')))
|
||||||
container.appendChild(cb(
|
container.appendChild(E.div(style='margin-left: 1rem'))
|
||||||
|
container.lastChild.appendChild(cb(
|
||||||
'paged_wheel_scrolls_by_screen', _('Mouse wheel scrolls by screen fulls instead of pages')))
|
'paged_wheel_scrolls_by_screen', _('Mouse wheel scrolls by screen fulls instead of pages')))
|
||||||
container.appendChild(cb(
|
container.lastChild.appendChild(cb(
|
||||||
'paged_margin_clicks_scroll_by_screen', _('Clicking on the margins scrolls by screen fulls instead of pages')))
|
'paged_margin_clicks_scroll_by_screen', _('Clicking on the margins scrolls by screen fulls instead of pages')))
|
||||||
container.appendChild(cb(
|
container.lastChild.appendChild(cb(
|
||||||
'paged_taps_scroll_by_screen', _('Tapping scrolls by screen fulls instead of pages')))
|
'paged_taps_scroll_by_screen', _('Tapping scrolls by screen fulls instead of pages')))
|
||||||
container.appendChild(
|
container.lastChild.appendChild(
|
||||||
E.div(style='display:grid;margin-top:1ex;align-items:center;grid-template-columns:auto min-content;grid-gap:1ex; max-width: 30em',
|
E.div(style='display:grid;margin-top:1ex;align-items:center;grid-template-columns:auto min-content;grid-gap:1ex; max-width: 30em',
|
||||||
*spinner(
|
*spinner(
|
||||||
'paged_pixel_scroll_threshold',
|
'paged_pixel_scroll_threshold',
|
||||||
_('Pixel scroll threshold:'),
|
'\xa0' + _('Pixel scroll threshold:'),
|
||||||
title=_('When using a touchpad or mouse wheel that produces scroll events in pixels, set the number of pixels before a page turn is triggered'),
|
title=_('When using a touchpad or mouse wheel that produces scroll events in pixels, set the number of pixels before a page turn is triggered'),
|
||||||
step=5,
|
step=5,
|
||||||
min=0,
|
min=0,
|
||||||
@ -84,11 +85,12 @@ def create_scrolling_panel(container, apply_func, cancel_func):
|
|||||||
|
|
||||||
container.appendChild(E.hr())
|
container.appendChild(E.hr())
|
||||||
container.appendChild(E.div(style='margin-top:1ex', _('Control how smooth scrolling works in flow mode')))
|
container.appendChild(E.div(style='margin-top:1ex', _('Control how smooth scrolling works in flow mode')))
|
||||||
container.appendChild(cb(
|
container.appendChild(E.div(style='margin-left: 1rem'))
|
||||||
|
container.lastChild.appendChild(cb(
|
||||||
'scroll_stop_boundaries',
|
'scroll_stop_boundaries',
|
||||||
_('Stop at internal file boundaries when smooth scrolling by holding down the scroll key')
|
_('Stop at internal file boundaries when smooth scrolling by holding down the scroll key')
|
||||||
))
|
))
|
||||||
container.appendChild(
|
container.lastChild.appendChild(
|
||||||
E.div(style='display:grid;margin-top:1ex;align-items:center;grid-template-columns:auto min-content;grid-gap:1ex; max-width: 30em',
|
E.div(style='display:grid;margin-top:1ex;align-items:center;grid-template-columns:auto min-content;grid-gap:1ex; max-width: 30em',
|
||||||
*spinner(
|
*spinner(
|
||||||
'lines_per_sec_smooth',
|
'lines_per_sec_smooth',
|
||||||
@ -116,7 +118,9 @@ def create_scrolling_panel(container, apply_func, cancel_func):
|
|||||||
)
|
)
|
||||||
|
|
||||||
container.appendChild(E.hr())
|
container.appendChild(E.hr())
|
||||||
container.appendChild(cb('book_scrollbar', _('Show a scrollbar')))
|
container.appendChild(E.div(style='margin-top:1ex', _('Miscellaneous')))
|
||||||
|
container.appendChild(E.div(style='margin-left: 1rem'))
|
||||||
|
container.lastChild.appendChild(cb('book_scrollbar', _('Show a scrollbar')))
|
||||||
|
|
||||||
container.appendChild(create_button_box(restore_defaults, apply_func, cancel_func))
|
container.appendChild(create_button_box(restore_defaults, apply_func, cancel_func))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user