Bug 334798 - Mouse cursor appearence does not change when hovering
Summary: Mouse cursor appearence does not change when hovering
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.19.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: junior-jobs
: 311825 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-05-15 08:52 UTC by Christian González
Modified: 2017-05-31 22:34 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian González 2014-05-15 08:52:33 UTC
The mouse cursor should change to cross-hair or normal when hovering over certain areas in Okular.

Reproducible: Always

Steps to Reproduce:
1. open any pdf in Okular. Stay out of the window when it approaches - shall mean: put your mouse cursor at the top  or bottom of the screen, so that it is NOT inside the window of Okular when the window appears. The mouse cursor is the normal arrow now.
2. Enter the window, the mouse cursor will stay an arrow, even when hovering over the text, and the selection mode is "selection" (Ctrl+3).
3. Now click again on the (in German) "Auswahl" toolbutton and enter the pdf canvas again.
4. The cursor now changes to the cross-hair.
5. move the cursor to the scrollbar on the right of the window.

Actual Results:  
It stays a cross-hair!

This works correctly (cursor being an arrow) on the left side (Preview).


Expected Results:  
Cursor should change to arrow when hovering over a scrollbar

What seems strange too is that after opening a pdf, the mouse hangs after Okular start for approx. 1s, until the Okular window appears. I don't see this with any other programs. Maybe it is another bug, maybe it has to do something with that here.

Seen under Kubuntu 14.04.
Comment 1 Christoph Feck 2014-06-02 21:25:08 UTC
*** Bug 311825 has been marked as a duplicate of this bug. ***
Comment 2 Oliver Sander 2017-05-15 12:49:49 UTC
Confirmed with current git master on Debian testing.
Comment 3 Albert Astals Cid 2017-05-21 21:37:19 UTC
Git commit 574fad92c8bed04e8b0c0fcbb84a9ecbd8cf685b by Albert Astals Cid, on behalf of Tobias Deiminger.
Committed on 21/05/2017 at 21:37.
Pushed by aacid into branch 'Applications/17.04'.

Initialize cursor in PageView scrollbars with ArrowCursor
REVIEW: 130131

M  +2    -0    ui/pageview.cpp

https://commits.kde.org/okular/574fad92c8bed04e8b0c0fcbb84a9ecbd8cf685b
Comment 4 Christoph Feck 2017-05-29 23:28:16 UTC
Missed the review. Would it be more correct to set the cursor on the viewport() instead of the whole scrollview? Then we do not need to fixup the scrollbars afterwards.
Comment 5 Albert Astals Cid 2017-05-30 20:04:38 UTC
It's not set on the whole scrollview, is it?
Comment 6 Christoph Feck 2017-05-31 00:18:49 UTC
PageView inherits from QAbstractScrollArea, so I am afraid the setCursor() calls there affect the complete scrollarea, not just the viewport.
Comment 7 Albert Astals Cid 2017-05-31 22:34:52 UTC
(In reply to Christoph Feck from comment #6)
> PageView inherits from QAbstractScrollArea, so I am afraid the setCursor()
> calls there affect the complete scrollarea, not just the viewport.

Ah you were commenting on the original code and not on the bugfix. 

No idea, you can propose a fix, get someone to review and test it and then commit it if you think it's better :)