1. 01 Oct, 2017 1 commit
    • Nathaniel Graham's avatar
      Custom background color · 6b5a7c9a
      Nathaniel Graham authored
      Summary:
      BUG: 182994
      
      Adds an option to the config dialog that enables background color (the color around the displayed page) to be changed (while by default preserving the Qt toolkit selection as not to affect existing users).
      
      Reasons for this change:
      Accessibility, eye strain, aesthetic reasons, color displayed on monitor can affect power consumption (how: depends on display technology).
      Many people want this change occording to Bugzilla and other sources.
      
      Maintenance: Nearly no additional maintenance:
      This is no new subsystem but a trivial feature with no complex code dependencies, and we are already showing a colour selection dialog and setting colours in other places in Okular.
      
      {F4257766}
      
      Other less important information:
      https://git.reviewboard.kde.org/r/130219/
      https://mail.kde.org/pipermail/okular-devel/2017-September/025520.html
      
      Test Plan:
      Tested everything, it all works:
      Toggled the custom background color, changed custom background color, removed okular settings file (with: "rm ~/.config/okular*") to verify it uses the usual qt theme colour by default (where the settings file remembered the custom color).
      
      Reviewers: #okular, aacid, elvisangelaccio, rkflx, ngraham
      
      Reviewed By: ngraham
      
      Subscribers: aacid, ltoscano, ngraham
      
      Tags: #okular
      
      Differential Revision: https://phabricator.kde.org/D8051
      6b5a7c9a
  2. 05 Sep, 2017 1 commit
  3. 28 Jul, 2017 1 commit
  4. 21 May, 2017 1 commit
  5. 13 Apr, 2017 1 commit
  6. 19 Mar, 2017 1 commit
    • Tobias Deiminger's avatar
      Add annotation resize functionality · 0957abc3
      Tobias Deiminger authored
      Usage:
      If you left-click an annotation, it gets selected. Resize handles appear on the selection rectangle. When cursor is moved over one of the 8 resize handles on the corners/edges, the cursor shape changes to indicate resize mode. Everywhere else on the annotation means "move", just as it was before resize feature was added. Pressing ESC or clicking an area outside the annotation cancels a selection. Pressing Del deletes a selected annotation.
      
      Feature is only applicable for annotation types AText, AStamp and AGeom.
      
      Implementation:
      It works by eventually changing AnnotationPrivate::m_boundary and notifying generator (i.e. poppler) about that change. Annotation state handling is shifted out of PageView into a new class MouseAnnotation (ui/pageviewmouseannotation.cpp). Some functionality not related to resizing but to annotation interaction in general is also shifted to class MouseAnnotation, to build a single place of responsiblity.
      
      Other changes:
      Add method Document::adjustPageAnnotation, backed by a QUndoCommand.
      class Okular::AdjustAnnotationCommand.
      Add Annotation::adjust and Annotation::canBeResized methods.
      Draw resize handles in PagePainter::paintCroppedPageOnPainter.
      
      Resize and move work
      -for types AText, AStamp and AGeom
      -on all pages of document
      -when viewport position changes
      -when zoom level changes
      -for all page rotations (0°, 90°, 180°, 270°)
      
      Selection is canceled
      -when currently selected annotation is deleted
      -on mouse click outside of currently selected annotation
      -ESC is pressed
      
      Viewport is shifted when mouse cursor during move/resize comes close to viewport border.
      Resize to negative is prevented.
      Tiny annotations are still selectable.
      If mouse is moved over an annotation type that we can focus, and the annotation is not yet focused, mouse cursor shape changes to arrow.
      If mouse cursor rests over an annotation A, while annotation B is focused, a tooltip for annotation A is shown.
      Selected Annotation is deleted when Del is pressed.
      
      Test for regressions:
      -Annotation interaction (focus, move, resize, start playback, ...) are only done in mode EnumMouseMode::Browse.
      -If mouse is moved over an annotation type where we can start an action, mouse cursor shape changes to pointing hand.
      -If mouse is moved over an annotation type that we can't interact with, mouse cursor shape stays a open hand.
      -If mouse cursor rests over an annotation of any type, a tooltip for that annotation is shown.
      -Grab/move scroll area (on left click + mouse move) is prevented, if mouse is over focused annotation, or over AMovie/AScreen/AFileAttachment annotation.
      -A double click on a annotation starts the "annotator".
      
      REVIEW: 127366
      BUG: 177778
      BUG: 314843
      BUG: 358060
      0957abc3
  7. 11 Mar, 2017 1 commit
  8. 08 Mar, 2017 1 commit
  9. 03 Mar, 2017 1 commit
  10. 02 Mar, 2017 1 commit
  11. 08 Feb, 2017 1 commit
  12. 14 Jan, 2017 1 commit
  13. 11 Jan, 2017 1 commit
    • Heiko Becker's avatar
      Invoke the correct KCModule · f968296c
      Heiko Becker authored
      The webshortcuts KCM has been renamed from 'ebrowsing' to
      'webshortcuts' when it was moved from konqueror to kio.
      
      REVIEW: 129805
      f968296c
  14. 28 Dec, 2016 1 commit
    • Albert Astals Cid's avatar
      Fix menu titles not showing up · e833b3ce
      Albert Astals Cid authored
      QMenu title/section are optional to draw from the style side but we have crucial information in them
      so reuse old KMenu code to create a fake action that behaves as title
      
      I'll see if KF5 wants to accept this as contribution later
      
      BUGS: 374079
      e833b3ce
  15. 04 Nov, 2016 1 commit
  16. 15 Oct, 2016 1 commit
  17. 01 Oct, 2016 1 commit
  18. 25 Jul, 2016 1 commit
  19. 24 Jul, 2016 4 commits
  20. 17 Jul, 2016 1 commit
  21. 11 Jul, 2016 1 commit
  22. 11 Mar, 2016 1 commit
  23. 28 Dec, 2015 1 commit
    • Patrick Spendrin's avatar
      Windows string fixes · d0ecab47
      Patrick Spendrin authored
      This patch changes multiline QStringLiterals to QString::fromLatin1
      as QStringLiterals doesn't understand multiline strings on windows.
      Also, strncasecmp is replaced by the portable qstrnicmp function provided
      by QByteArray header.
      
      REVIEW: 126379
      d0ecab47
  24. 29 Oct, 2015 1 commit
  25. 27 Oct, 2015 1 commit
  26. 14 Sep, 2015 1 commit
  27. 27 Aug, 2015 1 commit
    • Jake Linder's avatar
      Add "Trim To Selection" feature · 172d78c6
      Jake Linder authored
      Changes
      
      C1. Added submenu, moved "Trim margins" (TM mode) to it and added  "Trim To Selection" (TS mode).
      C2. Activating "Trim To selection" enters a new mousemode, similar to RectSelect for defining a viewport.
      C3. Once a viewport has been defined, it serves as a viewport for all pages in the document.
      C4. Left/Right pages are not treated differently.
      
      Manual Testing
      
      T1. Switching between modes enforces at most one active.
      T2. Can deactivate a mode by selecting it again from the menu.
      T3. When draggin bbox selection, clicking outside page does not crash.
      T4. When in "Facing Pages" mode, mouse release must be over any page (or is ignored).
      T5. Normalized bbox coords are computed relative to page indicated by point of mouse release.
      T6. Behave as expected when switching between any pair of No Trim/Trim Margins/Trim To Selection.
      T7. TM mode persisted across app restarts (existing behavior).
      T8. TS mode forgotten across app restarts (as desired).
      T9. Exiting and reselectin "Trim To Selection" prompts for new bbox.
      T10. Choosing a small Trim bbox enforces minimium dimensions size (As percentag of total), as
      it does in TM mode, because of the "scale big and crop down" implementation, to avoid huge pixmaps.
      TS mode minimum set at 20% (vs. TM mode's 50%).
      
      REVIEW: 124716
      BUGS: 351156
      172d78c6
  28. 25 Aug, 2015 1 commit
    • Jan Kundrát's avatar
      Fix picking of different view modes · cf513f3d
      Jan Kundrát authored
      This was broken since commit 077689c4 when this got ported away from
      KAction. The code attempted to add a parent QMenu to the QAction
      instances nested below that parent. I'm quite surprised that it didn't
      crash, but checkable actions do not go well with actions that have
      nested menus, apparently.
      
      I haven't checked the rest of the code for similar mistakes, but I don't
      see any other case of this bug in Okular's menus when reading PDFs.
      
      REVIEW: 124842
      cf513f3d
  29. 20 Aug, 2015 1 commit
    • Tobias Koenig's avatar
      Add basic support for RichMedia annotations in PDF files · 8b603c17
      Tobias Koenig authored
      That patch extracts the video file, which is defined in a
      rich media annotation as parameter for the flash player,
      and uses the normal multimedia player, to playback the video
      file.
      
      This feature requires poppler-qt5 in version 0.36.
      
      FEATURE: 326230
      REVIEW: 124612
      8b603c17
  30. 18 Aug, 2015 1 commit
  31. 20 Jul, 2015 1 commit
  32. 21 May, 2015 1 commit
  33. 15 Apr, 2015 1 commit
    • Albert Astals Cid's avatar
      Fix crash on closing · aed8a9b3
      Albert Astals Cid authored
      Tell the document we're no longer an observer in the destructor
      BUGS: 346149
      FIXED-IN: KDE Applications 15.04.1
      aed8a9b3
  34. 17 Mar, 2015 1 commit
  35. 16 Mar, 2015 1 commit
  36. 13 Mar, 2015 2 commits