[okular] [Bug 436742] Involuntary scrolling when annotations encounter edge of page

Oliver Sander bugzilla_noreply at kde.org
Tue Nov 15 14:34:03 GMT 2022


https://bugs.kde.org/show_bug.cgi?id=436742

Oliver Sander <oliver.sander at tu-dresden.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/grap
                   |                            |hics/okular/commit/e6002e79
                   |                            |8d06cf52a71d9d35716c4d0b9c2
                   |                            |82d99
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #4 from Oliver Sander <oliver.sander at tu-dresden.de> ---
Git commit e6002e798d06cf52a71d9d35716c4d0b9c282d99 by Oliver Sander, on behalf
of Nikola Nikolic.
Committed on 15/11/2022 at 13:30.
Pushed by sander into branch 'master'.

Fix: Involuntary scrolling when annotations encounter the edge of the page

There are three reasons why scrolling happens (first two cases of scrolling are
actually due to
viewport transition that is triggered by annotation being traslated/created):

1. VisiblePageRect are NormalizedRect and should be represented by four values
in [0, 1] interval.
   Due to rounding errors caused by using QRect, they only reach the [0, 0.999]
interval.
   That means that right and bottom edge of the page are never visible so if
annotation
   is translated along the right/bottom edge viewport transition occurs (fixed
in
   PageView::slotRequestVisiblePixmaps)

2. For freehand line there are some constants (dX, dY) that make a line to be
drawn outside
   the page borders causing viewport transition. Removing these constants
solves the problem (fixed
   in SmoothPathEngine::event)

3. Browse mode is activated as soon as the cursor is moved outside the
viewport.
   Instead, we should forward the move event to the annotation which than can
ignore the event (fixed
   in PageView::mouseMoveEvent)

M  +8    -10   part/annotationtools.cpp
M  +11   -6    part/pageview.cpp

https://invent.kde.org/graphics/okular/commit/e6002e798d06cf52a71d9d35716c4d0b9c282d99

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list