ReaderHighlight: allow for 2-steps text selection (#8432)

Add a "Select" button in the highlight dialog to initiate
text selection; on the next text selection, the text between
these 2 points will be selected.
Limited to a single page with non-CRE documents.
Also move "Search" button at end, so it's the one that
will be wide in case of an odd number of buttons.
This commit is contained in:
hius07 authored and GitHub committed 2021-11-21 18:31:10 +01:00
1 parent 0824886fde
commit c7229d90bc
2 files changed
+152 -56

No files matched your search

@@ -539,9 +539,10 @@ function ReaderBookmark:onShowBookmark()
{
{
text = _("Remove bookmark"),
enabled = not bookmark.ui.highlight.select_mode,
callback = function()
UIManager:show(ConfirmBox:new{
text = _("Remove bookmark?"),
text = _("Remove this bookmark?"),
ok_text = _("Remove"),
ok_callback = function()
bookmark:removeHighlight(item)
@@ -570,6 +571,7 @@ function ReaderBookmark:onShowBookmark()
{
{
text = _("Bulk remove"),
enabled = not bookmark.ui.highlight.select_mode,
callback = function()
self.select_mode = true
self.select_count = 0