Find a file
Tobias Deiminger a29e4eaff5 Fix inconsistent viewport positioning in PageView
Summary:
This diff unifies the calculation of the viewport position from a given DocumentViewport. PageView::notifyViewportChanged and PageView::slotRelayoutPages used to handle it differntly, which resulted in viewport jumps for no reason.

It happened in various situations, e.g. when jumping to a page using the footer page navigation, or when reloading the document after presentation mode left, or when resizing the main window after presentation mode left.

The diff selects the notifyViewportChanged way (align viewport top border with page top margin) as golden behavior in case of rePos.enabled == false.

BUGS: 357958
CCBUG: 341939
CCBUG: 400890

341939 and 400890 are fixed partially. These two still suffer from a minor displacement that happens when finished signal arrives from pixmap generation thread.

Test Plan:
- When using the footer page navigation to jump to different pages, new page top is always algined with viewport top.
- After changing page with footer page navigation, press F5 to reload. Page top stays aligned with viewport top.
- When exiting presentation mode, and touching the file, page top stays aligned with viewport top.
- When exiting presentation mode, and changing main window size, page top stays aligned with viewport top.

Reviewers: #okular, sander

Reviewed By: sander

Subscribers: ngraham, sander, aacid, okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D16941
2018-11-29 21:41:43 +01:00
autotests Fix inconsistent viewport positioning in PageView 2018-11-29 21:41:43 +01:00
cmake/modules Use a target in FindDiscount (modern cmake) rather than variables 2018-05-08 21:39:06 +02:00
conf Support setting text color for typewriter annotations 2018-10-04 20:02:55 +02:00
core Remove unused variables 2018-11-02 18:03:26 +01:00
doc Add 'Zoom to 100%' option to the docs 2018-10-28 14:24:01 +02:00
generators Fix DjVu links pointing to pages with different dimensions 2018-11-28 23:11:00 +01:00
interfaces Fix minor EBN issues 2018-08-31 12:23:45 +03:00
mobile Explicitly import Qt 5.7's QtQuick for Connections.enabled 2018-11-27 19:41:25 +01:00
shell GIT_SILENT made messages (after extraction) 2018-11-21 07:23:43 +01:00
ui Fix inconsistent viewport positioning in PageView 2018-11-29 21:41:43 +01:00
.arcconfig Add the base .arcconfig file 2017-08-30 01:28:40 +02:00
.gitignore Add .gitignore 2014-09-17 23:55:42 +02:00
.krazy synctex is "external code", make krazy stay away from it 2010-02-08 23:15:24 +00:00
aboutdata.h Extending my (C) 2017-09-11 16:30:56 +02:00
AUTHORS oKular goes poppler 2006-03-19 18:03:43 +00:00
CMakeLists.txt GIT_SILENT Upgrade KDE Applications version to 18.11.90. 2018-11-26 14:36:37 +01:00
config-okular.h.cmake Force release of free memory 2018-05-30 10:55:17 +02:00
COPYING - MERGE KPDF 3.5 CHANGES 2005-11-04 11:59:51 +00:00
COPYING.DOC Add copies of the GFDL-1.2 and LGPL-2 2011-07-07 18:22:06 +02:00
COPYING.LIB Add copies of the GFDL-1.2 and LGPL-2 2011-07-07 18:22:06 +02:00
extensions.cpp Fix build without implicit cast to/from ascii 2016-07-11 22:11:43 +02:00
extensions.h Fix minor EBN issues 2018-09-01 11:25:57 +03:00
kdocumentviewer.h Fix minor EBN issues 2018-08-17 21:05:01 +03:00
Mainpage.dox remove deprecated Encoding key from desktop files 2018-01-02 22:35:40 +01:00
Messages.sh Make the drawing tools be actions instead of tool buttons 2015-08-22 22:17:40 +02:00
metainfo.yaml dox: the 'interfaces' subdir contains public API as well 2016-12-04 19:04:53 +01:00
okular.categories add markdown support 2017-08-25 01:05:23 +02:00
okular.upd Separate settings in core and non core 2012-10-16 00:28:29 +02:00
Okular5Config.cmake.in add missing include for find_dependency https://build.neon.kde.org/job/xenial_unstable_applications_okular_lintcmake/59/console 2017-10-27 14:53:23 +01:00
okular_part.desktop SVN_SILENT made messages (.desktop file) - always resolve ours 2018-10-10 06:37:12 +02:00
OkularConfigureChecks.cmake Force release of free memory 2018-05-30 10:55:17 +02:00
part-viewermode.rc Create new "Zoom to 100%" action 2018-10-27 08:49:50 -06:00
part.cpp Remove unused variables 2018-11-02 18:03:26 +01:00
part.h Fix minor EBN issues 2018-09-01 11:25:57 +03:00
part.rc Create new "Zoom to 100%" action 2018-10-27 08:49:50 -06:00
README.internals.png Optimize PNG files again. 2008-01-02 00:10:07 +00:00
TODO Fix some typos found by Krazy2 2013-06-24 13:46:16 +03:00