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
2021-11-21 19:31:10 +02:00
committed by GitHub
parent 0824886fde
commit c7229d90bc
2 changed files with 152 additions and 56 deletions

View File

@@ -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