Fix #1866536 [[Enhancement - Viewer] Move close button to the left of the toolbar](https://bugs.launchpad.net/calibre/+bug/1866536)

This commit is contained in:
Kovid Goyal 2020-03-16 16:01:05 +05:30
parent be46831806
commit ccd4840013
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -494,8 +494,7 @@ class OpenBook: # {{{
def show(self, container): def show(self, container):
container.style.backgroundColor = get_color('window-background') container.style.backgroundColor = get_color('window-background')
container.appendChild(E.div( container.appendChild(E.div(
style='padding: 1ex 1em; border-bottom: solid 1px currentColor; display:flex; justify-content: space-between', style='padding: 1ex 1em; border-bottom: solid 1px currentColor; display:flex; justify-content: flex-start',
E.h2(_('Open a new book')),
E.div( E.div(
svgicon('close'), style=f'cursor:pointer', svgicon('close'), style=f'cursor:pointer',
onclick=def(event): onclick=def(event):
@ -506,6 +505,7 @@ class OpenBook: # {{{
ui_operations.quit() ui_operations.quit()
, ,
class_='simple-link'), class_='simple-link'),
E.h2(_('Open a new book'), style='margin-left: 1rem'),
)) ))
create_open_book(container, self.overlay.view?.book) create_open_book(container, self.overlay.view?.book)
# }}} # }}}