Fix reload/delete overlay content not vertically centered

This commit is contained in:
Kovid Goyal 2020-01-22 07:58:54 +05:30
parent 496e6d57d7
commit 0ff6cf80d1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -67,17 +67,18 @@ class DeleteBook: # {{{
def show(self, container): def show(self, container):
self.container_id = container.getAttribute('id') self.container_id = container.getAttribute('id')
set_css(container, display='flex', justify_content='center', flex_direction='column', background_color=get_color('window-background')) set_css(container, background_color=get_color('window-background'))
container.appendChild( container.appendChild(E.div(
E.div(style='margin:1ex 1em', style='display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%',
E.div(style='margin:1ex 1em; max-width: 80%',
E.h2(self.question), E.h2(self.question),
E.div(style='display:flex; justify-content:flex-end', E.div(style='display:flex; justify-content:flex-end; margin-top:1rem',
create_button(self.ok_text, self.ok_icon, action=self.delete_book, highlight=True), create_button(self.ok_text, self.ok_icon, action=self.delete_book, highlight=True),
E.span('\xa0'), E.span('\xa0'),
create_button(_('Cancel'), action=self.cancel), create_button(_('Cancel'), action=self.cancel),
) )
) )
) ))
def show_working(self): def show_working(self):
container = document.getElementById(self.container_id) container = document.getElementById(self.container_id)