tobiasdeiminger created this revision. Herald added a project: Okular. Herald added a subscriber: okular-devel. tobiasdeiminger requested review of this revision.
REVISION 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: 400890 TEST PLAN - When using the footer page navigation to jump to different pages, new page top is always algined 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. REPOSITORY R223 Okular BRANCH unify_vp_calc REVISION DETAIL https://phabricator.kde.org/D16941 AFFECTED FILES ui/pageview.cpp ui/pageview.h To: tobiasdeiminger Cc: okular-devel, ngraham, aacid