mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Improve formatting of preferences button box on small screens. Fixes #1851930 [Large Reset button in the Viewer settings](https://bugs.launchpad.net/calibre/+bug/1851930)
This commit is contained in:
parent
263bb0ce88
commit
bc5166d99a
@ -13,13 +13,12 @@ def create_button_box(restore_defaults_func, apply_func, cancel_func):
|
|||||||
if restore_defaults_func:
|
if restore_defaults_func:
|
||||||
rbutton = create_button(_('Restore defaults'), action=restore_defaults_func)
|
rbutton = create_button(_('Restore defaults'), action=restore_defaults_func)
|
||||||
else:
|
else:
|
||||||
rbutton = restore_defaults_func or E.div('\xa0')
|
rbutton = E.div('\xa0')
|
||||||
cbutton.style.marginLeft = '1rem'
|
obutton = create_button(_('OK'), action=apply_func)
|
||||||
|
for b in (rbutton, obutton, cbutton):
|
||||||
|
b.style.marginTop = '1ex'
|
||||||
return E.div(
|
return E.div(
|
||||||
style='margin-top: 1rem; display: flex; justify-content: space-between',
|
style='margin-top: 1rem; display: flex; justify-content: space-between; align-items: flex-start',
|
||||||
rbutton,
|
rbutton,
|
||||||
E.div(
|
E.div(obutton, E.div('\xa0'), cbutton, style='margin-left: 1rem; display: flex; align-items: flex-start; flex-wrap: wrap'),
|
||||||
create_button(_('OK'), action=apply_func),
|
|
||||||
cbutton
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user