mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
The chrome lookup word control is not a toggle
This commit is contained in:
parent
bda006557a
commit
626b2209d6
@ -333,8 +333,8 @@ class EbookViewer(MainWindow):
|
||||
else:
|
||||
self.highlights_widget.focus()
|
||||
|
||||
def toggle_lookup(self):
|
||||
self.lookup_dock.setVisible(not self.lookup_dock.isVisible())
|
||||
def toggle_lookup(self, force_show=False):
|
||||
self.lookup_dock.setVisible(force_show or not self.lookup_dock.isVisible())
|
||||
|
||||
def toc_clicked(self, index):
|
||||
item = self.toc_model.itemFromIndex(index)
|
||||
|
@ -240,7 +240,7 @@ class ViewerBridge(Bridge):
|
||||
toggle_highlights = from_js()
|
||||
new_bookmark = from_js()
|
||||
toggle_inspector = from_js()
|
||||
toggle_lookup = from_js()
|
||||
toggle_lookup = from_js(object)
|
||||
show_search = from_js()
|
||||
search_result_not_found = from_js(object)
|
||||
find_next = from_js(object)
|
||||
@ -437,7 +437,7 @@ class WebView(RestartingWebEngineView):
|
||||
toggle_highlights = pyqtSignal()
|
||||
new_bookmark = pyqtSignal()
|
||||
toggle_inspector = pyqtSignal()
|
||||
toggle_lookup = pyqtSignal()
|
||||
toggle_lookup = pyqtSignal(object)
|
||||
quit = pyqtSignal()
|
||||
update_current_toc_nodes = pyqtSignal(object, object)
|
||||
toggle_full_screen = pyqtSignal()
|
||||
|
@ -320,7 +320,7 @@ class MainOverlay: # {{{
|
||||
if runtime.is_standalone_viewer:
|
||||
actions_div.appendChild(E.ul(
|
||||
ac(_('Lookup/search word'), _('Lookup or search for the currently selected word'),
|
||||
def(): self.overlay.hide(), ui_operations.toggle_lookup();, 'library')
|
||||
def(): self.overlay.hide(), ui_operations.toggle_lookup(True);, 'library')
|
||||
))
|
||||
actions_div.lastChild.appendChild(highlight_action)
|
||||
actions_div.lastChild.appendChild(
|
||||
|
Loading…
x
Reference in New Issue
Block a user