mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-13 13:11:41 +00:00
Show tooltips when hovering over links in mouse selection modes as well.
Previously, these tooltips were only shown in "Browse mode". This patch adds them for "Selection", "Text selection", and "Trim selection" as well. These are the modes where the cursor changes to a hand when hovering over a link. BUG: 397783 Differential Revision: https://phabricator.kde.org/D15123
This commit is contained in:
parent
6a37055351
commit
81ac73fcf5
|
@ -3385,7 +3385,13 @@ void PageView::wheelEvent( QWheelEvent *e )
|
|||
|
||||
bool PageView::viewportEvent( QEvent * e )
|
||||
{
|
||||
if ( e->type() == QEvent::ToolTip && d->mouseMode == Okular::Settings::EnumMouseMode::Browse )
|
||||
if ( e->type() == QEvent::ToolTip
|
||||
// Show tool tips only for those modes that change the cursor
|
||||
// to a hand when hovering over the link.
|
||||
&& ( d->mouseMode == Okular::Settings::EnumMouseMode::Browse
|
||||
|| d->mouseMode == Okular::Settings::EnumMouseMode::RectSelect
|
||||
|| d->mouseMode == Okular::Settings::EnumMouseMode::TextSelect
|
||||
|| d->mouseMode == Okular::Settings::EnumMouseMode::TrimSelect ) )
|
||||
{
|
||||
QHelpEvent * he = static_cast< QHelpEvent* >( e );
|
||||
if ( d->mouseAnnotation->isMouseOver() )
|
||||
|
|
Loading…
Reference in a new issue