Summary:
This way pages that take more than 500ms to render get updated every so often so that the
user can see that the program didn't hang, it's just that it's taking long to render
Tags:
incremental rendering, partial updates
BUGS: 344081
Subscribers: #okular
Tags: #okular
Differential Revision: https://phabricator.kde.org/D8379
We don't need to delete the threadweaver job, threadweaver does it by itself,
and if we call deleteLater it may happen that the main thread deletes it
and then when the threadweaver thread tries to call the delete things are
gone and it goes kaboom
BUGS: 382725
Summary:
so that pixmap generation gets a chance to start before the text generation
This makes that on files where both the text generation and the pixmap generation
are slow at least we see something "as fast as possible" since only either text generation
or pixmap generation threads run at the same time
Reviewers: #okular, mlaurent
Reviewed By: mlaurent
Subscribers: michaelweghorn, dvratil, mlaurent, #okular
Tags: #okular
Differential Revision: https://phabricator.kde.org/D8378
Summary:
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
Show non-intrusive info messages whenever the search start over from the
beginning or the bottom of the document, instead of asking the user if
s/he wants to continue the search. This is consistent with search in
KWrite/Kate and with web browsers.
Based on work of and reviewed by Elvis Angelaccio
Summary:
This should prevent crashes when reloading some synctex-enabled pdf
files created with newer versions of TeXLive. We also gain bugfixes,
features and improved accuracy from the last 6 years of synctex
development.
Procedure followed:
- svn co svn://tug.org/texlive/trunk/Build/source/texk/web2c/synctexdir
- Check out revision 45150
- Update files present in core/synctex/*
- Adapt Okular code to changes
- Review and drop or update/apply old patches using quilt
- Create missing patches for local synctex changes
- New patch: Omit warning message when opening non-synctex pdf
- Two new patches to fix more compiler warnings
- New patch: Plug multiple leaks and prevent a segfault
TODO for later:
- Move sync file detection code to Okular to never call into synctex C code for non-synctex files
- Evaluate feasibility of upstreaming all patches for TeXLive 2018 and using synctex as a library
BUG: 383915
FIXED-IN: 17.12.0
Test Plan:
- No crash in synctex on reloading empty.pdf from bugreport anymore.
- Shift-clicking on a word in a simple pdf opens Kate with the corresponding tex line.
- Forward and backward search in Kile seems to work.
- Works with synctex files from both TeXLive 2015 and 2017.
- PartTest::testForwardPDF still passes.
- No additional memory leaks in autotests and with basic synctex and non-synctex usage of Okular.
Reviewers: #okular, sander, #kile, aacid
Reviewed By: #okular, aacid
Subscribers: mludwig, aacid
Tags: #okular
Differential Revision: https://phabricator.kde.org/D7594
The method FilePrinter::psPaperSize used to contain a long
list of hard-coded paper sizes for the different paper formats.
This patch makes the method get the same information
from QPrinter directly, which is much simpler and more
robust, too.
Note that the method is not actually used anywhere in okular,
though, so this change is purely cosmetic.
REVIEW: 130043
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
If a generator can open multiple mime types that match the same file, avoid showing a backend chooser dialog with multiple instances of the same
backend
REVIEW: 129791
BUG: 374650
If a generator can open multiple mime types that match the same file, avoid showing a backend chooser dialog with multiple instances of the same
backend
REVIEW: 129791
BUG: 374650
Stopping on the first inherit match can prevent finding a perfect match, and thus we might enter a competition of inherit matches from other generators.
Example: spectre supports application/postscript and image/x-eps. When opening an eps the app/ps is an inherit match, but so is text/plain from the txt generator. Thanks to stable_sort() the txt generator is deterministically selected from the above two inherit matches. Unless we continue and find the perfect match, which is spectre:image/x-eps.
REVIEW: 129610