1. 13 Dec, 2020 8 commits
  2. 09 Dec, 2020 1 commit
  3. 20 Nov, 2020 2 commits
    • David Hurka's avatar
      Fix QScroller crash on Qt < 5.14 and certain screen arrangements · c6a32751
      David Hurka authored
      QScrollerPrivate::setDpiFromWidget() before Qt 5.14 crashes
      when the target widget does not intersect a physical screen,
      because QDesktopWidget returns screen index `-1` in this case,
      which leads to an out-of-range read from QApplication::screens(),
      which leads to a segfault when reading from an invalid QScreen* pointer.
      
      This adds a workaround that checks for the `-1` situation,
      and then tries to resize PageView temporarily to intersect at least some screen.
      
      BUG: 425188
      FIXED-IN: 20.12
      c6a32751
    • Alex Rosca's avatar
      Avoid unintentional accelerating flicks by reducing maximum flick time · 8ae95b29
      Alex Rosca authored
      When making a flick using the mouse or the touchscreen and then slowly
      dragging the pages in the same direction with the flick, it unintentionally
      reenters the flicking state after a mouse button release and it's quite
      annoying. The commit reduces the maximum time before the next flick.
      
      Steps to reproduce:
      1) Flick in direction A.
      2) While the view is coasting, decide that you want to stop close to the current position.
      3) Grab the view (still coasting), and drag it slowly in direction A.
      4) When you reached the desired point, stop your movement, and release the view.
      5) QScroller interprets this release as “accelerating flick”,
         and makes the view coast faster in direction A.
      
      Upstream bug is QTBUG-88249; QScroller ignores MinimumVelocity for accelerating flicks.
      8ae95b29
  4. 18 Nov, 2020 1 commit
    • David Hurka's avatar
      New part/ directory for okularpart sources from /, ui/, conf/ · 19d5dd8e
      David Hurka authored
      Source files are no longer separated by UI and non-UI and similar,
      but only by their build target.
      
      * ui/ -> part/
      * Move all source files from conf/ to part/
      * Keep config skeleton definitions in conf/, needed for the mobile target too
      * Move editdrawingtooldialogtest.h from conf/autotests/ to autotests/
      * ui/data/icons/ -> icons/
      * Move /part.cpp, /part.rc and similar files to part/
      * Adapt include paths in source files
      * Adapt CMakeLists.txt files (in / and in subdirectories)
      * Adapt /Messages.sh
      19d5dd8e
  5. 14 Nov, 2020 1 commit
    • Alexander Lohnau's avatar
      Remove dead code · 3c1fa441
      Alexander Lohnau authored
      A lot of this code has been commented out for over
      a decade and adds no value to the project.
      It is only annoying when you look over it ;).
      
      Same for the KNS2 support which was commented out.
      
      Also some of the debug statements didn't even build
      anymore, because the properties got removed/refactored.
      3c1fa441
  6. 03 Nov, 2020 1 commit
  7. 01 Nov, 2020 1 commit
  8. 23 Oct, 2020 1 commit
  9. 21 Oct, 2020 3 commits
    • Nate Graham's avatar
      Fix fast scrolling with Shift+Scroll · 777ac37e
      Nate Graham authored
      When holding down the shift key, multiply wheel and touchpad scroll
      distances by 10 to re-implement the fast scrolling feature that
      broke when we added animated/smooth scrolling.
      
      BUG: 420889
      FIXED-IN: 1.11.3
      777ac37e
    • David Hurka's avatar
      Fix cursor not updated after clicking internal link · 843c43cc
      David Hurka authored
      updateCursor() was called by wheelEvent(), which made sense,
      because after the wheel event the page will have moved under the cursor.
      
      With smooth scrolling, it makes less sense in wheelEvent(),
      because at that point scrolling is still in the future.
      
      scrollContentsBy() appears to be called on every scroll step.
      (It is documented to be called at scrollbar value changes, so makes sense.)
      
      This patch removes updateCursor() from wheelEvent(), but adds it to scrollContentsBy().
      
      I did not check anything out with d->visibleItems, as was indicated it !176.
      
      BUG: 421437
      843c43cc
    • David Hurka's avatar
      Fix cursor not updated after clicking internal link · 8b008b02
      David Hurka authored
      updateCursor() was called by wheelEvent(), which made sense,
      because after the wheel event the page will have moved under the cursor.
      
      With smooth scrolling, it makes less sense in wheelEvent(),
      because at that point scrolling is still in the future.
      
      scrollContentsBy() appears to be called on every scroll step.
      (It is documented to be called at scrollbar value changes, so makes sense.)
      
      This patch removes updateCursor() from wheelEvent(), but adds it to scrollContentsBy().
      
      I did not check anything out with d->visibleItems, as was indicated it !176.
      
      BUG: 421437
      8b008b02
  10. 12 Oct, 2020 1 commit
    • David Hurka's avatar
      Fix scrolling with scrollbar when the slider is not clicked · 17c26699
      David Hurka authored
      This fixes scrolling with the scrollbar,
      so it is not reset when scrolling on the viewport afterwards.
      
      PageView’s QSroller was not correctly updated by update_scroller,
      because it was connected to QAbstractSlider::sliderMoved and sliderReleased,
      which are only emitted while the “slider is down”,
      i. e. not when the user scrolls the scrollbar other than dragging the slider.
      Now update_scroller is connected to actionTriggered(),
      which is emitted for all user interactions.
      
      Note that scrolling using the scrollbar calls QAbstractScrollArea::scrollContentsBy(),
      and so bypasses smooth scrolling of the QScroller. This could be considered a feature,
      otherwise it is more a bug in Qt than in Okular, because we can not ignore scrollContentsBy().
      
      Steps to reproduce:
      1. Open a long document
      2. Click on the vertical scrollbar below the slider
      3. Okular scrolls one page down
      4. Scroll in the viewport
      5. Okular starts scrolling from the position from step 1.
      
      Test plan:
      * Scroll using scrollbar
        + Click on the vertical scrollbar below the slider
        + Middle-click on the vertical scrollbar below the slider
        + Click on the little arrow of the vertical scrollbar
        + Scroll using a scrolling device (e. g. `xdotool click 4`) on the vertical scrollbar
        + Drag the slider of the scrollbar
      * “cross-product” verify QScroller state
        + Scroll using a scrolling device on the viewport
        + Scroll using Browse tool dragging
        + Scroll the viewport by clicking a point in the thumbnails view
        + Scroll the viewport using arrow keys and Page Up/Down keys
      
      BUG: 421159
      17c26699
  11. 29 Sep, 2020 1 commit
  12. 25 Sep, 2020 1 commit
    • Kezi Olio's avatar
      Fix forms when inertially scrolling · bdb2df77
      Kezi Olio authored
      `setViewport` automatically adds an item to the history if it finds that it
      moved for more than a page, which we don't want to do when automatically
      scrolling, as with inertial scrolling.
      
      This commit adds a new function `setViewportWithHistory()` which takes an
      argument to optionally avoid preserving history. This avoids breaking ABI.
      The new history-less functionality is used when inertially scrolling.
      
      BUG: 421354
      FIXED-IN: 1.11.2
      bdb2df77
  13. 24 Sep, 2020 1 commit
    • Nate Graham's avatar
      Add option to disable smooth scrolling · 122528d3
      Nate Graham authored
      Even though the animated smooth scrolling transitions are now affected
      by the global animation speed setting in Plasma, this is not totally
      satisfactory for the full pool of people who hate smooth scrolling, as
      it does not address the cases of people using Okular outside of Plasma
      or people who generally want animations but just not in Okular's
      scrolling implementation.
      
      Accordingly, there is now a GUI option to disable smooth scrolling in
      Okular's settings window.
      
      BUG: 420755
      FIXED-IN: 20.12
      122528d3
  14. 21 Sep, 2020 1 commit
    • Albert Astals Cid's avatar
      Show "Follow link" if right clicking over link and annotation · 3f892463
      Albert Astals Cid authored
      Unite handling of right click in mouse release event
      
      Before we had handling on press -> show annot menu if annot
      and in release -> show link menu if link or show the genericmenu if nothing
      
      Now we do everything on release and do
      show link and annot menu if both
      show link menu if link
      show annot menu if annot
      show generic menu if nothing
      
      It helps with the fact that you can't click on links if there's an
      annotation on top, which is a bit of a pain but it makes sense since
      annotations usually have more interaction than links, you can select,
      move, etc. them
      
      BUGS: 425291
      3f892463
  15. 15 Sep, 2020 1 commit
  16. 14 Sep, 2020 4 commits
  17. 11 Sep, 2020 2 commits
  18. 07 Sep, 2020 1 commit
    • Pedro Arthur Pinheiro Rosa Duarte's avatar
      Remove artifact while navigating though pages · 5d947905
      Pedro Arthur Pinheiro Rosa Duarte authored
      When the view is paged (ie, non continuous), and an annotation is
      selected while the user navigate through pages, the annotation
      selection will become an artifact in other pages. Besides that,
      the annotation will still receive keystrokes (such as delete).
      
      Steps to Reproduce:
       - Open a PDF file with Okular
       - Draw an ellipsis annotation in the document
       - Select the ellipsis
       - Change to the previous or next page
      5d947905
  19. 31 Aug, 2020 2 commits
  20. 17 Jul, 2020 2 commits
  21. 16 Jul, 2020 1 commit
    • David Hurka's avatar
      Annotations: explicitly accept tablet event when it is handled · 15ac564b
      David Hurka authored
      This fixes the jagged freehand lines problem.
      It was caused because tablet events were not accepted, and so were delivered again as mouse event, creating an additional line point slightly offset, causing sharp line angles.
      
      BUG: 410723
      FIXED-IN: 1.11
      15ac564b
  22. 14 Jul, 2020 1 commit
    • David Hurka's avatar
      Add RTL layout KToggleAction · 13481bdf
      David Hurka authored
      This adds a KToggleAction to PageView, which toggles RTL layout, which was previously only accessible from Configure Okular -> General.
      
      The action is not in any toolbar, just in the action collection. Called "rtl_page_layout" and reads "Use Right to Left Reading Direction".
      
      FEATURE: 424103
      13481bdf
  23. 11 Jul, 2020 1 commit
    • Albert Astals Cid's avatar
      Run clang-format · 19d98d6a
      Albert Astals Cid authored
      find . \( -name "*.cpp" -or -name "*.h"  -or -name "*.c"  -or -name "*.cc" \) -exec clang-format -i {} \;
      
      If you reached this file doing a git blame, please see README.clang-format (added 2 commits in the future of this one)
      19d98d6a
  24. 08 Jul, 2020 1 commit