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):
|
def container(self):
|
||||||
return document.getElementById('book-read-aloud-overlay')
|
return document.getElementById('book-read-aloud-overlay')
|
||||||
|
|
||||||
@property
|
|
||||||
def supports_css_min_max(self):
|
|
||||||
return True
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def bar(self):
|
def bar(self):
|
||||||
return document.getElementById(self.bar_id)
|
return document.getElementById(self.bar_id)
|
||||||
@ -109,7 +105,7 @@ class ReadAloud:
|
|||||||
else:
|
else:
|
||||||
bar_container.classList.remove('speaking')
|
bar_container.classList.remove('speaking')
|
||||||
clear(bar_container)
|
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")
|
bar_container.style.backgroundColor = get_color("window-background")
|
||||||
for x in [
|
for x in [
|
||||||
E.div(style='height: 4ex; display: flex; align-items: center; padding: 5px; justify-content: center'),
|
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)
|
notes = self.annotations_manager.notes_for_highlight(annot_id)
|
||||||
bar_container = self.bar
|
bar_container = self.bar
|
||||||
clear(bar_container)
|
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")
|
bar_container.style.backgroundColor = get_color("window-background")
|
||||||
notes_container = E.div()
|
notes_container = E.div()
|
||||||
notes_container.addEventListener('wheel', def(evt): evt.stopPropagation();, {'passive': False})
|
notes_container.addEventListener('wheel', def(evt): evt.stopPropagation();, {'passive': False})
|
||||||
@ -373,18 +373,11 @@ class SelectionBar:
|
|||||||
c = notes_container.lastChild
|
c = notes_container.lastChild
|
||||||
notes_container.style.display = notes_container.previousSibling.style.display = 'block'
|
notes_container.style.display = notes_container.previousSibling.style.display = 'block'
|
||||||
c.style.overflow = 'auto'
|
c.style.overflow = 'auto'
|
||||||
if self.supports_css_min_max:
|
c.style.maxHeight = 'min(20ex, 40vh)'
|
||||||
c.style.maxHeight = 'min(20ex, 40vh)'
|
|
||||||
else:
|
|
||||||
c.style.maxHeight = '20ex'
|
|
||||||
render_notes(notes, c, True)
|
render_notes(notes, c, True)
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# accessors {{{
|
# accessors {{{
|
||||||
@property
|
|
||||||
def supports_css_min_max(self):
|
|
||||||
return not runtime.is_standalone_viewer or runtime.QT_VERSION >= 0x050f00
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def container(self):
|
def container(self):
|
||||||
return document.getElementById('book-selection-bar-overlay')
|
return document.getElementById('book-selection-bar-overlay')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user