diff --git a/src/pyj/read_book/highlights.pyj b/src/pyj/read_book/highlights.pyj index df10cf09c8..a68262c888 100644 --- a/src/pyj/read_book/highlights.pyj +++ b/src/pyj/read_book/highlights.pyj @@ -117,9 +117,10 @@ def custom_styles_equal(a, b): class EditNotesAndColors: # {{{ - def __init__(self, container, is_dark_theme, current_notes, current_style, close_editor): + def __init__(self, container, is_dark_theme, current_notes, current_style, annot_id, close_editor): self.initial_style = current_style self.is_dark_theme = is_dark_theme + self.annot_id = annot_id def finish(): close_editor(True) @@ -159,7 +160,10 @@ class EditNotesAndColors: # {{{ E.span('\xa0'), remove_button ), - create_button(_('Finish'), 'check', finish, _('Finish editing highlight') + ' [Ctrl+Enter]', True), + create_button( + _('Apply') if self.annot_id else _('Create'), + 'check', finish, + (_('Finish editing highlight') if self.annot_id else _('Create highlight')) + ' [Ctrl+Enter]', True), ) ) diff --git a/src/pyj/read_book/selection_bar.pyj b/src/pyj/read_book/selection_bar.pyj index 2398f3b406..096fc04237 100644 --- a/src/pyj/read_book/selection_bar.pyj +++ b/src/pyj/read_book/selection_bar.pyj @@ -607,8 +607,9 @@ class SelectionBar: clear(container) container.style.display = 'block' self.state = EDITING + cs = self.view.currently_showing.selection self.current_editor = EditNotesAndColors( - container, self.view.current_color_scheme.is_dark_theme, notes, highlight_style, self.hide_editor) + container, self.view.current_color_scheme.is_dark_theme, notes, highlight_style, cs.annot_id, self.hide_editor) self.place_editor() def place_editor(self):