diff --git a/src/pyj/read_book/overlay.pyj b/src/pyj/read_book/overlay.pyj index ee768a44a9..45045d21dc 100644 --- a/src/pyj/read_book/overlay.pyj +++ b/src/pyj/read_book/overlay.pyj @@ -585,21 +585,7 @@ class OpenBook: # {{{ pass # Dont allow panel to be closed by a click def show(self, container): - container.style.backgroundColor = get_color('window-background') - container.appendChild(E.div( - style='padding: 1ex 1em; border-bottom: solid 1px currentColor; display:flex; justify-content: flex-start', - E.div( - svgicon('close'), style=f'cursor:pointer', - onclick=def(event): - event.preventDefault(), event.stopPropagation() - if self.closeable: - self.overlay.hide_current_panel(event) - else: - ui_operations.quit() - , - class_='simple-link'), - E.h2(_('Open a book'), style='margin-left: 1rem'), - )) + simple_overlay_title(_('Open a book'), self.overlay, container) create_open_book(container, self.overlay.view?.book) # }}}