mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-27 16:06:04 +01:00
Partition create_annotations.pyj
This commit is contained in:
parent
8cbb068b04
commit
12d1b31e98
1 changed files with 6 additions and 7 deletions
|
|
@ -16,11 +16,7 @@
|
|||
from widgets import create_button
|
||||
|
||||
|
||||
# TODO:
|
||||
# Export all annots as plain text/JSON
|
||||
|
||||
|
||||
class AnnotationsManager:
|
||||
class AnnotationsManager: # {{{
|
||||
|
||||
def __init__(self, view):
|
||||
self.view = view
|
||||
|
|
@ -131,6 +127,7 @@ def highlights_for_currently_showing(self):
|
|||
if h.spine_name is name and not h.removed and h.start_cfi:
|
||||
ans.push(h)
|
||||
return ans
|
||||
# }}}
|
||||
|
||||
|
||||
WAITING_FOR_CLICK = 1
|
||||
|
|
@ -206,7 +203,7 @@ def create_bar():
|
|||
return ans
|
||||
|
||||
|
||||
class EditNotesAndColors:
|
||||
class EditNotesAndColors: # {{{
|
||||
|
||||
def __init__(self, container, hide_middle, accept, current_notes, current_style):
|
||||
self.initial_style = current_style
|
||||
|
|
@ -365,9 +362,10 @@ def current_style(self):
|
|||
is_dark = max(rgba[0], rgba[1], rgba[2]) < 115
|
||||
fg = light_fg if is_dark else dark_fg
|
||||
return {'background-color': bg, 'color': fg}
|
||||
# }}}
|
||||
|
||||
|
||||
class CreateAnnotation:
|
||||
class CreateAnnotation: # {{{
|
||||
|
||||
container_id = 'create-annotation-overlay'
|
||||
|
||||
|
|
@ -811,3 +809,4 @@ def place_handles_after_scroll(self, extents, handle, extended):
|
|||
else:
|
||||
self.place_single_handle(self.left_handle, extents.start)
|
||||
self.place_single_handle(self.right_handle, extents.end)
|
||||
# }}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue