1. 08 Nov, 2021 1 commit
  2. 29 Aug, 2021 1 commit
  3. 10 Jun, 2021 1 commit
  4. 19 Mar, 2021 1 commit
    • Oliver Sander's avatar
      Use device pixel ratio for the correct screen · 7ffd08aa
      Oliver Sander authored
      The method qApp->devicePixelRatio() should only be used under
      special circumstances.  The documentation of QGuiApplication says:
      
        "Returns the highest screen device pixel ratio found on the system.
         [...] Use this function only when you don't know which window
         you are targeting. If you do know the target window,
         use QWindow::devicePixelRatio() instead."
      
      The Okular code used qApp->devicePixelRatio() a few times without
      reason.  Few people noticed this, because apparently only Windows
      and Wayland can set per-screen dprs.  This patch replaces those
      calls with the correct QWindow call.
      7ffd08aa
  5. 07 Mar, 2021 1 commit
    • Oliver Sander's avatar
      Remove device pixel ratio scaling from PixmapRequest · ccda6d2a
      Oliver Sander authored and Albert Astals Cid's avatar Albert Astals Cid committed
      The PixmapRequest constructor expected width and height in logical
      pixels, and scaled them to device pixels.  However, not knowing what
      screen the request is for, it had to use qApp->devicePixelRatio()
      for the scaling.  That value may not be correct if not all screens
      use the same scaling.
      
      Fix this by introducing a new constructor that takes the device
      pixel ratio as an additional argument, and deprecating the old
      constructor.
      ccda6d2a
  6. 28 Feb, 2021 1 commit
  7. 04 Feb, 2021 1 commit
  8. 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
  9. 30 Sep, 2020 1 commit
  10. 09 Aug, 2020 1 commit
    • David Hurka's avatar
      Port PresentationWidget to QScreen and simplify related code · 89280e82
      David Hurka authored and Albert Astals Cid's avatar Albert Astals Cid committed
      * QDesktopWidget -> QScreen
      
      Simplifications:
      * After setting new screen/geometry, forget them and let resizeEvent() handle any updates.
      * Specifically, don’t connect to screen size change signals.
      * Specifically, setScreen() only sets the new widget position and then waits for resizeEvent().
      * This also means applyNewScreenSize() and repositionContent() can be collapsed into resizeEvent().
      * Replace recalcGeometry() by setScreen(defaultScreen()), where defaultScreen() only checks the configuration.
      89280e82
  11. 06 Aug, 2020 1 commit
    • David Hurka's avatar
      PresentationWidget: Fix screen switching at runtime · 2c70ec41
      David Hurka authored
      Screen switching from inside presentation mode currently does not work correctly.
      The reason is that the widget geometry() shall be moved
      *while* the widget is configured as fullscreen.
      This patch temporarily disables fullscreen, so the screen can be switched.
      
      You can check it with release 20.04:
      Screen switching from within presentation mode will not work.
      Set the widget to windowed (e. g. Alt+F3 or right-click in task manager),
      screen switching will work now.
      
      !233 shall port PresentationWidget to QScreen in release 20.12,
      so this is just a compact workaround without much intelligence.
      The drawback is that custom window rules might get confused when the
      screen geometry changes for some reasons.
      2c70ec41
  12. 16 Jul, 2020 1 commit
    • David Hurka's avatar
      Add Constrain Angle action for annotation tools, alternative to pressing Shift · 34708565
      David Hurka authored
      This adds a KToggleAction which sets annotation tools to constrain angle mode.
      It provides an alternative user interface to the Shift button, which is used to constrain angles since MR !210.
      The action and the Shift button are XOR-ed, i. e. if constrain angle mode is activated, pressing Shift temporarily disables it.
      
      The action state is remembered accross sessions, for consistency with most other actions. It should be difficult to check this action without knowing of its existence, since it is not in any toolbar or menu, just in the action collection.
      
      The meaning of AnnotatorEngine::Modifiers was generalized a bit, moving the responsibility about whether to constrain angles back to PageViewAnnotator, because AnnotatorEngine does not know about the action.
      
      FEATURE: 353560
      FIXED-IN: 1.11
      34708565
  13. 13 Jul, 2020 1 commit
  14. 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
  15. 08 Jul, 2020 1 commit
  16. 21 Feb, 2020 1 commit
  17. 19 Feb, 2020 1 commit
  18. 24 Dec, 2019 1 commit
  19. 09 Dec, 2019 1 commit
  20. 30 Nov, 2019 1 commit
  21. 18 Sep, 2019 1 commit
  22. 01 Aug, 2019 3 commits
  23. 27 Jul, 2019 1 commit
  24. 03 Jul, 2019 2 commits
  25. 22 Jun, 2019 1 commit
    • Oliver Sander's avatar
      Mind the devicePixelRatio when drawing on-screen in presentation mode · 19f22098
      Oliver Sander authored
      Previously, when using a screen scaling factor larger than 1, the
      drawings by mouse or stylus in presentation mode were slightly blocky.
      The underlying cause was
      a) a few integer types used for non-integer coordinates
      b) the intermediate use of a QPixmap without the correct
         devicePixelRatio
      
      Additionally, this patch uses a QPainterPath to draw the path,
      rather than a sequence of individual lines.  This improves
      the line quality a tiny bit, because the lines are properly
      joined.
      
      BUG: 384143
      
      Differential Revision: https://phabricator.kde.org/D21836
      19f22098
  26. 27 May, 2019 1 commit
  27. 26 Mar, 2019 2 commits
  28. 11 Mar, 2019 1 commit
    • Oliver Sander's avatar
      Presentation: optionally go to prev. page when touching left half of the page · 50bfd9fe
      Oliver Sander authored
      This patch makes switching presentation slides using touch screen taps
      more flexible.  It introduces a new configuration option
      'Touch navigation' with three possible values:
      * 'Tap left/right side to go back/forward':
         Tapping on the left(right) half of the screen
        makes the presentation go to the previous(next) slide.
      * 'Tap anywhere to go forward':
        Tapping on the screen makes the presentation go to the
        next slide, no matter where the screen is being tapped
      * 'Disabled':
        Screen tapping doesn't do anything.
      
      Previously, only 'Tap anywhere...' was implemented.
      
      This patch does not change the behavior of mouse clicks.
      
      Differential Revision: https://phabricator.kde.org/D18118
      50bfd9fe
  29. 27 Feb, 2019 1 commit
  30. 11 Jan, 2019 1 commit
  31. 09 Jan, 2019 1 commit
  32. 21 Dec, 2018 1 commit
  33. 14 Nov, 2018 1 commit
  34. 18 Sep, 2018 1 commit
    • Tobias Deiminger's avatar
      Avoid undefined behavior due to dangling file descriptor · fa7a1b3d
      Tobias Deiminger authored
      Summary:
      We request a inhibit lock of DBus type UNIX_FD from systemd logind. It's wrapped into (and owned by) a QDBusUnixFileDescriptor object of automatic storage. The file descriptor will be closed in QDBusUnixFileDescriptor Dtor, and may be reused by some other facility (e.g. pulseaudio).
      
      If we want to store the lock longer than QDBusUnixFileDescriptor lifetime, we have to dup the file descriptor. If we don't dup, and close the original fd later in PresentationWidget::allowPowerManagement, bad things may happen.
      
      Besides that, what we get from systemd is really a file descriptor, not a "cookie". So I renamed the m_sleepInhibitCookie to m_sleepInhibitFd and changed initial state to -1 accordingly.
      
      BUG 393478
      BUG 398720
      
      Test Plan:
      - bugs don't occur any longer
      - inhibiting sleep during presentation mode still works
      
      Reviewers: aacid
      
      Reviewed By: aacid
      
      Subscribers: ngraham, anthonyfieroni, okular-devel
      
      Tags: #okular
      
      Differential Revision: https://phabricator.kde.org/D15574
      fa7a1b3d
  35. 31 Aug, 2018 1 commit
  36. 17 Aug, 2018 1 commit