<table><tr><td style="">tobiasdeiminger created this revision.<br />Herald added a project: Okular.<br />Herald added a subscriber: okular-devel.<br />tobiasdeiminger requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D16941">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>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.</p>

<p>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.</p>

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

<p>BUGS: 400890</p></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">When using the footer page navigation to jump to different pages, new page top is always algined with viewport top.</li>
<li class="remarkup-list-item">When exiting presentation mode, and touching the file, page top stays aligned with viewport top.</li>
<li class="remarkup-list-item">When exiting presentation mode, and changing main window size, page top stays aligned with viewport top.</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>BRANCH</strong><div><div>unify_vp_calc</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D16941">https://phabricator.kde.org/D16941</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>ui/pageview.cpp<br />
ui/pageview.h</div></div></div><br /><div><strong>To: </strong>tobiasdeiminger<br /><strong>Cc: </strong>okular-devel, ngraham, aacid<br /></div>