mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Remove unused code
This commit is contained in:
parent
c96a330013
commit
bb39475132
@ -57,10 +57,6 @@ class ReadAloud:
|
||||
def container(self):
|
||||
return document.getElementById('book-read-aloud-overlay')
|
||||
|
||||
@property
|
||||
def supports_css_min_max(self):
|
||||
return True
|
||||
|
||||
@property
|
||||
def bar(self):
|
||||
return document.getElementById(self.bar_id)
|
||||
@ -109,7 +105,7 @@ class ReadAloud:
|
||||
else:
|
||||
bar_container.classList.remove('speaking')
|
||||
clear(bar_container)
|
||||
bar_container.style.maxWidth = 'min(40rem, 80vw)' if self.supports_css_min_max else '40rem'
|
||||
bar_container.style.maxWidth = 'min(40rem, 80vw)'
|
||||
bar_container.style.backgroundColor = get_color("window-background")
|
||||
for x in [
|
||||
E.div(style='height: 4ex; display: flex; align-items: center; padding: 5px; justify-content: center'),
|
||||
|
@ -296,7 +296,7 @@ class SelectionBar:
|
||||
notes = self.annotations_manager.notes_for_highlight(annot_id)
|
||||
bar_container = self.bar
|
||||
clear(bar_container)
|
||||
bar_container.style.maxWidth = 'min(50rem, 90vw)' if self.supports_css_min_max else '50rem'
|
||||
bar_container.style.maxWidth = 'min(50rem, 90vw)'
|
||||
bar_container.style.backgroundColor = get_color("window-background")
|
||||
notes_container = E.div()
|
||||
notes_container.addEventListener('wheel', def(evt): evt.stopPropagation();, {'passive': False})
|
||||
@ -373,18 +373,11 @@ class SelectionBar:
|
||||
c = notes_container.lastChild
|
||||
notes_container.style.display = notes_container.previousSibling.style.display = 'block'
|
||||
c.style.overflow = 'auto'
|
||||
if self.supports_css_min_max:
|
||||
c.style.maxHeight = 'min(20ex, 40vh)'
|
||||
else:
|
||||
c.style.maxHeight = '20ex'
|
||||
render_notes(notes, c, True)
|
||||
# }}}
|
||||
|
||||
# accessors {{{
|
||||
@property
|
||||
def supports_css_min_max(self):
|
||||
return not runtime.is_standalone_viewer or runtime.QT_VERSION >= 0x050f00
|
||||
|
||||
@property
|
||||
def container(self):
|
||||
return document.getElementById('book-selection-bar-overlay')
|
||||
|
Loading…
x
Reference in New Issue
Block a user