mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
db246496de
commit
e730b0a65e
@ -42,6 +42,7 @@ def set_css(elem, **kw):
|
||||
s.removeProperty('-' + prefix + '-' + name)
|
||||
else:
|
||||
s.setProperty('-' + prefix + '-' + name, val)
|
||||
return elem
|
||||
|
||||
def build_rule(selector, **kw):
|
||||
ans = v'[selector + " { "]'
|
||||
|
@ -40,16 +40,13 @@ class MainOverlay: # {{{
|
||||
|
||||
def show(self, container):
|
||||
self.container_id = container.getAttribute('id')
|
||||
top_row = E.div(
|
||||
E.div(
|
||||
container.appendChild(set_css(E.div(
|
||||
set_css(E.div(
|
||||
onclick=def (evt):evt.stopPropagation();,
|
||||
E.div(self.overlay.view.book.metadata.title, style='max-width: 90%; text-overflow: ellipsis'),
|
||||
E.div(self.date_formatter.format(Date()), style='max-width: 9%; text-overflow: ellipsis'),
|
||||
onclick=def (evt):evt.stopPropagation();,
|
||||
style='font-size: smaller; padding: 0.5ex 1rem; border-bottom: solid 1px currentColor'
|
||||
)
|
||||
)
|
||||
set_css(top_row.firstChild, background_color=get_color('window-background'), display='flex', justify_content='space-between', align_items='baseline')
|
||||
container.appendChild(top_row)
|
||||
), display='flex', justify_content='space-between', align_items='baseline', font_size='smaller', padding='0.5ex 1rem', border_bottom='solid 1px currentColor')
|
||||
), background_color=get_color('window-background')))
|
||||
self.timer = setInterval(self.update_time, 1000)
|
||||
|
||||
def update_time(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user