`setViewport` automatically adds an item to the history if it finds that it
moved for more than a page, which we don't want to do when automatically
scrolling, as with inertial scrolling.
This commit adds a new function `setViewportWithHistory()` which takes an
argument to optionally avoid preserving history. This avoids breaking ABI.
The new history-less functionality is used when inertially scrolling.
BUG: 421354
FIXED-IN: 1.11.2
Even though the animated smooth scrolling transitions are now affected
by the global animation speed setting in Plasma, this is not totally
satisfactory for the full pool of people who hate smooth scrolling, as
it does not address the cases of people using Okular outside of Plasma
or people who generally want animations but just not in Okular's
scrolling implementation.
Accordingly, there is now a GUI option to disable smooth scrolling in
Okular's settings window.
BUG: 420755
FIXED-IN: 20.12
Unite handling of right click in mouse release event
Before we had handling on press -> show annot menu if annot
and in release -> show link menu if link or show the genericmenu if nothing
Now we do everything on release and do
show link and annot menu if both
show link menu if link
show annot menu if annot
show generic menu if nothing
It helps with the fact that you can't click on links if there's an
annotation on top, which is a bit of a pain but it makes sense since
annotations usually have more interaction than links, you can select,
move, etc. them
BUGS: 425291
Bug 421159 involves a combination of scrolling with the scroll bar
and the mouse wheel. This patch adds an autotest for the bug,
to make sure it doesn't come back.
QScroller uses a minimum drag distance before drag scrolling starts by default.
This sets the minimum distance to 0.0, to restore the original behavior of the Browse tool.
BUG: 420842
This uses KConfigWatcher to listen for changes to the relevant config
value and update the speed dynamically, rather that just once when the
app is launched.
Now people who don't like animations can set thenm to "Instant" globally
and smooth scrolling will be effectively disabled off in Okular.
There is no change in speed for people using the default global
animation duration.
BUG: 420755
FIXED-IN: 1.12.0
Avoids all the explicit boilerplate needed, ensures the dependency on
the JSON file ia also set and allows simple export of the setup
in the installed CMake config file, so other projects importing
the config file have the respective CMake macros set as recommended.
Test Plan:
Still builds as before. Touch a plugin metadata JSON file now triggers a moc
rerun. CMake config file contains setup of variables.