1. 25 Jul, 2019 1 commit
    • Simone Gaiarin's avatar
      General improvements to stamp annotation · f15e8568
      Simone Gaiarin authored
      - Add push button to select custom stamp image
      - Check if loaded image is usable as stamp or throw error
      - Keep image proportions in previewer
      - Move previewer below the combobox to display larger preview
      Annotation tool:
      - Keep stamp image proportion in annotation preview (while left mouse button is down)
      - Adding the annotation with one-click (without holding the left mouse button and dragging) adds the stamp with original proportions
      BUG: 370381
      BUG: 383652
      CCBUG: 383651
      FIXED-IN: 1.9.0
      Closes T8074
      - [ ] Check if filters in file chooser make sense / propose better alternative
      - [x] Update doc ( @yurchor will do it after we merge this)
      Test Plan:
      From stamp annotation configuration dialog:
      - Show a warning regarding limitations of the feature's current implementation
      - Click push button next to combo box opens a file selector
      - Selecting a corrupted image file should throw an error
      - Selecting a good image file shows the preview of the image
      - Select a horizontal image shows a large clear preview
      - Select a vertical image file shows a smaller preview without messing up the visual of the config dialog
      - Input a valid icon name in the combobox and the preview of the icon is shown
      From page view, select the stamp annotation with horizontal image file (not squared):
      - Click and hold. The preview maintains proportions
      - Single click. The stamp image in the pdf maintains proportions and has the same size of the click and hold preview.
      - Add an annotation of the Okular custom stamps (internal SVG so treated slightly differently) do not create problems
      Reviewers: #okular, ngraham
      Reviewed By: ngraham
      Subscribers: pino, aacid, yurchor, ngraham, okular-devel
      Tags: #okular
      Maniphest Tasks: T8074
      Differential Revision: https://phabricator.kde.org/D22064
  2. 01 Jun, 2019 1 commit
    • Tobias Deiminger's avatar
      Add line annotation ending arrows for non PDF documents · d0e3a77d
      Tobias Deiminger authored
      This implements drawing the various line ending styles for 2 point lines in non-PDF documents.
      Looks like this:
      CCBUG: 381629
      Test Plan:
      - open a *.txt document
      - draw line annotations with different arrow styles: Square, Diamond, OpenArrow, ClosedArrow, ROpenArrow, RClosedArrow, Butt, Slash, Circle
      - ... as start and as end style (start needs D21238 to be configurable in GUI)
      - ... filled or not (fill color can't be configured in GUI yet)
      - ... with different leader line settings
      - ... at various angles
      - rotate and scale page
      - leader line with setting 100 gives 100 pixel line at 100% zoom (use kruler to verify)
      Reviewers: #okular, aacid, sander
      Reviewed By: sander
      Subscribers: ngraham, sander, knambiar, okular-devel
      Tags: #okular
      Differential Revision: https://phabricator.kde.org/D21248
  3. 14 May, 2019 1 commit
    • Tobias Deiminger's avatar
      Fix line annotation leader line angle · a0045a97
      Tobias Deiminger authored
      For "Straight Line" annotations, the "Leader Lines" (if any) shall be perpendicular to the main line segment. Current code missed to consider page aspect ratio when calculating the main segment angle, which caused non-perpendicular leader lines.
      Note: Bug is only visible with non-PDF documents (i.e. where Okular draws line annotation, instead of generator).
      Test Plan:
      - open a txt file, the generated page will have aspect ratio 3:4
      - configure a "Straight Line" annotation with long leader line
      - create a line annotation at 45 degree angle
      - check the leader line, it shall be perpendicular to the main line
      Reviewers: sander
      Reviewed By: sander
      Subscribers: aacid, okular-devel
      Tags: #okular
      Differential Revision: https://phabricator.kde.org/D21136
  4. 08 Nov, 2018 1 commit
  5. 04 Oct, 2018 1 commit
    • Dileep Sankhla's avatar
      Support setting text color for typewriter annotations · e44ff387
      Dileep Sankhla authored
      Changing typewriter text color can be done in the typewriter properties dialog, or programmatically via new okular API methods TextAnnotation::textColor and TextAnnotation::setTextColor.
      poppler >= 0.69 is required to store text color natively inside PDF documents. For other document types, text color is stored as metadata inside the document archive.
      This work was done during GSoC 2018. See https://community.kde.org/GSoC/2018/StatusReports/DileepSankhla for details.
      Test Plan:
      - properties dialog of typewriter annotation has "Font Color" picker
      - saving to PDF results in <r> <g> <b> rg operation in /DA
      - saving to archive results in fontColor="rrggbb" attribute in metadata.xml
      Reviewers: sander
      Reviewed By: sander
      Subscribers: kde-doc-english, sander, okular-devel
      Tags: #okular, #documentation
      Differential Revision: https://phabricator.kde.org/D15205
  6. 25 Sep, 2018 1 commit
    • Dileep Sankhla's avatar
      Add typewriter annotation tool · 6dd7cf66
      Dileep Sankhla authored
      Typewriter is originally specified by the PDF reference as special FreeText annotation, where Intent=FreeTextTypewriter. It features opaque letters on transparent background, so that users can fill non interactive forms. Herewith typewriter is implemented natively for PDF, and there's also an Okular specific implementation for other document types. The added tool reuses the inline note UI.
      This work was done during GSoC 2018. See https://community.kde.org/GSoC/2018/StatusReports/DileepSankhla for details.
      FEATURE: 353401
      Test Plan:
      - okularpartrc is generated (if not yet existing) with typewriter as 10th tool
      - typewriter tool is also available in Annotation Tools -> Add, Typ "Typewriter"
      - selecting the tool and left click into document opens inline note input dialog
      - finishing creates an annotation similar to inline note, but with transparent background
      - saving into PDF results in /Subtype FreeText /IT /FreeTextTypeWriter
      - saving typewriter into archive stores color with alpha channel = 0x00
      - opening annotated archive works, if archive was created with old Okular, and opened in patched Okular
      - opening annotated archive works, if archive was created with patched Okular, and opened in old Okular
      Reviewers: sander
      Reviewed By: sander
      Subscribers: ngraham, sander, okular-devel
      Tags: #okular
      Differential Revision: https://phabricator.kde.org/D15204
  7. 17 Aug, 2018 1 commit
  8. 18 May, 2018 1 commit
  9. 23 Nov, 2017 2 commits
  10. 14 Oct, 2017 1 commit
    • Lukas Hetzenecker's avatar
      HiDPI Support for Okular · ecc1141e
      Lukas Hetzenecker authored
      This patch enables HiDPI throughout the application
      Every pixmap is multiplied by the devicePixelRatioF
      QPainter code is ajusted to take the DPR value into account
      All pixmaps get cached with the highest DPR of all screens. When moving the application to another screen, the cache doesn't have to be invalidated.
      BUGS: 362856 383589
      REVIEW: D6268
  11. 05 Sep, 2017 1 commit
  12. 08 Aug, 2017 1 commit
  13. 19 Mar, 2017 1 commit
    • Tobias Deiminger's avatar
      Add annotation resize functionality · 0957abc3
      Tobias Deiminger authored
      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.
      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
  14. 01 Feb, 2017 1 commit
  15. 14 Jan, 2017 1 commit
  16. 29 Oct, 2016 1 commit
  17. 24 Jul, 2016 2 commits
  18. 11 Jul, 2016 1 commit
  19. 21 Mar, 2016 1 commit
  20. 30 Jan, 2016 2 commits
    • Aleix Pol Gonzalez's avatar
      Drop libkscreen dependency · f42a3bad
      Aleix Pol Gonzalez authored
      Drops the x11 fallback. We were falling back to QX11Extras that were in
      fact using QScreen internally.
      Also remove the QDesktopWidget fallbacks for the same reason.
      Drops some API for fetching the dpi and unifies it with ::realDpi(QWidget).
      Based on Sebas's patch.
      Reviewed by Albert.
      REVIEW: 126913
    • Patrick Spendrin's avatar
      Remove kdelibs4support from the generator plugins · 37d56231
      Patrick Spendrin authored
      This removes kdelibs4support for all generators except the mobipocket one.
      The test executable for kimgio needs some windows fixes too, so I'll try
      to make a separate review for that.
      REVIEW: 126375
  21. 24 Nov, 2015 1 commit
  22. 29 Oct, 2015 1 commit
  23. 09 Jul, 2015 1 commit
  24. 16 Sep, 2014 1 commit
  25. 11 Sep, 2014 1 commit
  26. 09 Sep, 2014 1 commit
  27. 23 Aug, 2014 1 commit
  28. 10 Aug, 2014 1 commit
  29. 09 Aug, 2014 1 commit
  30. 08 Aug, 2014 1 commit
  31. 19 Feb, 2014 1 commit
    • Michal Humpula's avatar
      Multiple Tiles Managers per Page · c07ee043
      Michal Humpula authored
      It's straighforward implementation. Every single place, where there were call for (or with) TilesManager, now has a DocumentObserver as companion. The m_tiledManager reference in PagePrivate was changed to QMap<DocumentObserver, TilesManager>.
      REVIEW: 113986
  32. 01 Jul, 2013 1 commit
  33. 18 May, 2013 2 commits
  34. 14 May, 2013 1 commit
  35. 18 Apr, 2013 1 commit
  36. 24 Feb, 2013 1 commit
    • Albert Astals Cid's avatar
      Remove the concept of observer/view id · 541650a4
      Albert Astals Cid authored
      Just use the pointer as id :-)
      This is BIC and SIC, increase the soversion now to makes sure we don't forget in the future
      Patch based in an earlier patch by Bogdan Cristea <cristeab@gmail.com>
      REVIEW: 109115