D12098: Resize content area to correct dimensions after zooming to Auto Fit

Chinmoy Ranjan Pradhan noreply at phabricator.kde.org
Tue Apr 10 19:15:38 UTC 2018


chinmoyr created this revision.
chinmoyr added reviewers: Okular, aacid.
Restricted Application added a project: Okular.
chinmoyr requested review of this revision.

REVISION SUMMARY
  After going from high zoom to "Auto Fit" a resize event is generated and the resize event handler
  tries to refresh the page view. Sometimes this can result in an infinite resize loop. Okular
  fixes this by resizing the content area to the new viewport size. As a consequence both horizontal
  and vertical scroll range become zero. Now if "Auto Fit" turns out to be "Fit Page" then it is fine
  but in case of "Fit Width" or "Fit Height", where one scroll range should be non-zero, both scroll
  bar disappear resulting in a view which appears to be frozen. So to fix this add scroll range
  to the dimension for which the scroll bar should be visible and then resize. Since the scroll range
  remains constant, an infinite resize loop won't occur.
  
  BUG: 341250

TEST PLAN
  Zoom in 400% and then select "Auto Fit".

REPOSITORY
  R223 Okular

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D12098

AFFECTED FILES
  ui/pageview.cpp

To: chinmoyr, #okular, aacid
Cc: michaelweghorn, ngraham, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20180410/46565de4/attachment.html>


More information about the Okular-devel mailing list