[UX] Links menu and handling tweaks (#4867)

- Removed "Swipe to follow first link on page" menu item and
  handling code, as it feels not really as practical as
  "Swipe to follow nearest link".
- Removed recently added "External link action", as we can
  just always present a popup with the url and the available
  actions.
- Generic handling of these actions in onGoToExternalLink(),
  so they are proposed on the Wikipedia lookup popup too.
- Allow external link on PDF documents (previously, only
  internal links were handled).
- Have "Ignore external links on tap" available on all
  document types.
- Added "Ignore external links on swipe" (default to true,
  the current behaviour).
- Added multiswipe gesture "Follow nearest internal link"
  (the existing "Follow nearest link" now follows the
  nearest external or internal link)
- ButtonDialogTitle: added an option to look a bit more
  alike ConfirmBoxes.
- Footnote popups: fix link unhighlight when tap on external link.
This commit is contained in:
poire-z
2019-04-02 18:27:35 +02:00
committed by Frans de Jonge
parent dde301e765
commit 5c38bcb8b7
4 changed files with 203 additions and 257 deletions

View File

@@ -948,7 +948,8 @@ function KoptInterface:getLinkFromPosition(doc, pageno, pos)
w = link.x1 - link.x0 + len,
h = link.y1 - link.y0 + len,
}
if _inside_box(pos, lbox) and link.page then
-- Allow external links, with link.uri instead of link.page
if _inside_box(pos, lbox) then -- and link.page then
return link, lbox
end
end