FEATURE: 414688 Add support for alternative scrolling method (prototype)
Needs RevisionPublic

Authored by yegori on Nov 30 2019, 2:35 PM.

Details

Reviewers
aacid
Group Reviewers
VDG
Okular
Summary

SUMMARY
I propose adding alternative scrolling behavior. It helps keeping up the reading speed in auto-scroll mode and it tires eyes less compared to traditional scrolling behavior. It's easier to show it once rather than explain it, so please check attached gif.

OBSERVED RESULT
In traditional scrolling entire page content moves upwards or downwards in order to make space for new or previous content.

EXPECTED RESULT
Keep page content steady. Have a separation horizontal line moving from top to bottom of a viewport. Everything below the line is a content of a current page. Everything above the line is a content of a next page. Line can be stylized as a shadow. Page is not necessarily a next page in a document but rather a viewport range of a document.

ADDITIONAL INFORMATION
I would really love to have this feature in Okular as due to my work I have to read a lot of material every day, and this scrolling mode helps me reading faster. I've done a prototype, and it works for me, but as I'm not a professional C++/Qt developer the code quality is poor. Also I don't have enough time recently to continue working on it. There are some improvement I'd like to add to my current prototype (apart from using proper C++ and performance optimizations), such as: create visual controls for scrolling speed in auto-scroll mode, preserve original scrolling behavior and make on/off switch for new behavior in View menu.

By submitting this feature request I hope that it will help seeing the resonance and feedbacks from other users, and, if not being assigned for implementation to some experienced okular developer, than at least helping me find somebody who would be able to cooperate with me on implementing this.

UPDATE: Here's another example which may better show proposed scrolling mode. At the beginning I scroll with mouse wheel, then I enable auto-scroll with Shift + Down Arrow keybinding.

Diff Detail

Repository
R223 Okular
Lint
Lint Skipped
Unit
Unit Tests Skipped
yegori created this revision.Nov 30 2019, 2:35 PM
Restricted Application added a project: Okular. · View Herald TranscriptNov 30 2019, 2:35 PM
Restricted Application added a subscriber: okular-devel. · View Herald Transcript
yegori requested review of this revision.Nov 30 2019, 2:35 PM
yegori added a reviewer: VDG.
ndavis added a subscriber: ndavis.EditedNov 30 2019, 3:47 PM

It took me a while to realize what the feature was, but now that I do, I think I would prefer it to the normal method of scrolling. As someone who frequently loses their place while reading, this would help a lot with that.

yegori edited the summary of this revision. (Show Details)Nov 30 2019, 6:24 PM

Hey Yegor, I like this idea. I’m not sure what you mean with adding visual controls.

Currently, auto-scrolling has no menu entries. Do you think there should be menu entries?

Or do you want a switch between the current auto-scroll behaviour and the new one? I think that can go into the settings (Configure Okular...).

I think you are aware of {naw Continuous} view mode. Auto-scrolling currently requires {nav Continuous) to be useful. For your suggested auto-scroll behaviour it will be the same, right?

yegori added a comment.EditedNov 30 2019, 7:21 PM

Hey Yegor, I like this idea.

Hi @davidhurka, thank you

I’m not sure what you mean with adding visual controls.
Currently, auto-scrolling has no menu entries. Do you think there should be menu entries?

I think it would be nice to have play/pause sort of button on instruments panel for example, but it is not required.
After using my prototype for a while I can say that next thing I would like it to have is a sort to easily set the auto-scroll speed.
As of right now there is no any indication what current speed is, and I have to just blindly click several times Shift+Down and Shift+Up to find the right speed.
So it'd be very handy to have some way to set desired speed (i.e. using QSlider widget or free text input field with numeric values and up and down buttons) and then just "start" auto-scroll (with "play" button I mentioned before or special key binding, but visual element would encourage users to try and appreciate the new feature)

Or do you want a switch between the current auto-scroll behaviour and the new one? I think that can go into the settings (Configure Okular...).

Yes, this kind of switch between current and new scrolling behavior can go into (Configure Okular...), but I don't have strong opinion on this.

I think you are aware of {naw Continuous} view mode. Auto-scrolling currently requires {nav Continuous) to be useful. For your suggested auto-scroll behaviour it will be the same, right?

Yes, I guess so.

Here's the list of thing to keep in mind a long the way:

  1. Auto-scroll speed is now determined as pixels/ms. I think it would be better if speed was determined by pages/minute, as right now there is a third factor which affect the actual time you have to read a page, which is view port height. If I set scale factor to fit page and I have speed 10 pixels per second and my viewport is 200 pixels height I'll have 20 seconds to read a page. If a make viewport twice bigger it will take 40 seconds to scroll the page, which shouldn't be the case to my mind.

Note Super cool extra feature would be to be able to set scroll speed based on words/minute, as distribution of text is not always equal along the page, and now, having constant scrolling speed, I usually have to compensate that by scrolling down with mouse wheel from time to time to make auto-scroll to catch up with where I'm reading.

  1. Currently auto scroll can be turned off by many different actions, such as pressing buttons, clicking mouse anywhere in viewport and others. I think that other scrolling methods shouldn't stop auto-scroll, for example if the page is left blank I should be able to press "page down" without stopping auto-scroll. I think there should be couple of methods to pause/resume auto-scroll, such as pressing space button, clicking left mouse button (on another click scroll resumes, or scroll resumes as soon as button is released, not sure yet), couple of ways to stop auto-scroll (for example special key binding, button in instruments panel). Difference between pause and stop is that after pause there are event which resume scroll, after stop those events don't resume scroll. Apart from that auto-scroll shouldn't be interrupted by any other actions.
aacid requested changes to this revision.Feb 21 2020, 6:53 PM
aacid added a subscriber: aacid.

Please move as a Merge Request in https://invent.kde.org/kde/okular

We have pre-commit CI and lots of checks including clazy and clang-tidy there so it's a much better place for doing the review/approval/merge of the code.

This revision now requires changes to proceed.Feb 21 2020, 6:53 PM