From 12d1b31e987f15a8ce8c76e8443b4f444eac2b68 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 26 Jul 2020 10:24:10 +0530 Subject: [PATCH] Partition create_annotations.pyj --- src/pyj/read_book/create_annotation.pyj | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/pyj/read_book/create_annotation.pyj b/src/pyj/read_book/create_annotation.pyj index f0941f59e8..5e584d31cb 100644 --- a/src/pyj/read_book/create_annotation.pyj +++ b/src/pyj/read_book/create_annotation.pyj @@ -16,11 +16,7 @@ from read_book.shortcuts import shortcut_for_key_event 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 @@ class AnnotationsManager: 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 @@ class EditNotesAndColors: 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 @@ class CreateAnnotation: else: self.place_single_handle(self.left_handle, extents.start) self.place_single_handle(self.right_handle, extents.end) +# }}}