mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add Read aloud entry to viewer controls
This commit is contained in:
parent
1966b790d2
commit
65445427fd
@ -334,6 +334,13 @@ class MainOverlay: # {{{
|
||||
if full_screen_actions.length:
|
||||
actions_div.appendChild(E.ul(*full_screen_actions))
|
||||
|
||||
actions_div.appendChild(E.ul(
|
||||
ac(_('Read aloud'), _('Read the book aloud'), def():
|
||||
self.overlay.hide()
|
||||
self.overlay.view.start_read_aloud()
|
||||
, 'bullhorn')
|
||||
))
|
||||
|
||||
no_selection_bar = not sd.get('show_selection_bar')
|
||||
if runtime.is_standalone_viewer:
|
||||
if no_selection_bar:
|
||||
|
@ -674,9 +674,11 @@ class View:
|
||||
else:
|
||||
self.iframe.contentWindow.focus()
|
||||
|
||||
def start_read_aloud(self):
|
||||
def start_read_aloud(self, dont_start_talking):
|
||||
self.selection_bar.hide()
|
||||
self.read_aloud.show()
|
||||
if not dont_start_talking:
|
||||
self.read_aloud.play()
|
||||
|
||||
def show_chrome(self, data):
|
||||
elements = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user