mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Hide selection bar when main chrome or highlights chrome are shown
This commit is contained in:
parent
2f9c735d2f
commit
bda006557a
@ -639,12 +639,14 @@ class CreateAnnotation:
|
|||||||
c = self.container
|
c = self.container
|
||||||
c.style.display = 'flex'
|
c.style.display = 'flex'
|
||||||
c.focus()
|
c.focus()
|
||||||
|
self.view.selection_bar.hide()
|
||||||
|
|
||||||
def hide(self):
|
def hide(self):
|
||||||
if self.is_visible:
|
if self.is_visible:
|
||||||
self.container.style.display = 'none'
|
self.container.style.display = 'none'
|
||||||
self.view.focus_iframe()
|
self.view.focus_iframe()
|
||||||
self.send_message('set-highlight-style', style=None)
|
self.send_message('set-highlight-style', style=None)
|
||||||
|
self.view.selection_bar.update_position()
|
||||||
|
|
||||||
def send_message(self, type, **kw):
|
def send_message(self, type, **kw):
|
||||||
self.view.iframe_wrapper.send_message('annotations', type=type, **kw)
|
self.view.iframe_wrapper.send_message('annotations', type=type, **kw)
|
||||||
|
@ -420,6 +420,10 @@ class View:
|
|||||||
self.iframe_wrapper.send_message('overlay_visibility_changed', visible=visible)
|
self.iframe_wrapper.send_message('overlay_visibility_changed', visible=visible)
|
||||||
if ui_operations.overlay_visibility_changed:
|
if ui_operations.overlay_visibility_changed:
|
||||||
ui_operations.overlay_visibility_changed(visible)
|
ui_operations.overlay_visibility_changed(visible)
|
||||||
|
if visible:
|
||||||
|
self.selection_bar.hide()
|
||||||
|
else:
|
||||||
|
self.selection_bar.update_position()
|
||||||
|
|
||||||
def on_handle_shortcut(self, data):
|
def on_handle_shortcut(self, data):
|
||||||
if data.name is 'back':
|
if data.name is 'back':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user