Show tooltips when hovering over links regardless of which mouse tool is currently selected
ClosedPublic

Authored by sander on Aug 28 2018, 1:20 PM.

Details

Summary

Currently these tooltips only appear in 'Browse' mode. KDE bug https://bugs.kde.org/show_bug.cgi?id=397783 asks for them to be shown in 'text selection' mode, too. I don't really see a reason to disable them in any mode, and therefore this patch simply removes the check for the mouse mode completely.

Test Plan

1 Open a pdf file with an internal or hyperlink
2 Switch to Browse mode
3 Hover over the link: a tooltip with the link target appears
4 Switch to text selection, zoom, magnifier, or any other mouse mode
5 Repeat Step 3: it still works

Diff Detail

Repository
R223 Okular
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sander created this revision.Aug 28 2018, 1:20 PM
Restricted Application added a project: Okular. · View Herald TranscriptAug 28 2018, 1:20 PM
Restricted Application added a subscriber: okular-devel. · View Herald Transcript
sander requested review of this revision.Aug 28 2018, 1:20 PM
aacid added a subscriber: aacid.Aug 28 2018, 10:09 PM

I disagree that they should show for all modes, imho we should only do it for the modes that turn the cursor into a hand when hovering the link, otherwise people may think they can "use" the link since it's giving hover information but you won't be able to

sander updated this revision to Diff 40635.Aug 29 2018, 11:36 AM

The updates diff makes the tooltips appear in the modes "Browse", "Selection", "Text selection", "Trim selection". These are the ones where the cursor changes to a hand when hovering over a link.

aacid accepted this revision.Aug 29 2018, 8:49 PM

Looks good.

Make sure you add the BUG keyword on the commit.

Also ideally we'd add an auto test so that this doesn't break, but it's not that important either so if it breaks again i guess we can fix it :)

This revision is now accepted and ready to land.Aug 29 2018, 8:49 PM
This revision was automatically updated to reflect the committed changes.