Commit graph

9124 commits

Author SHA1 Message Date
Albert Astals Cid
389c7b0235 PagePainter: Don't draw Arrow/Line annotations with multipyl
Otherwise they will be transparent when they shouldn't

BUGS: 425075
2020-08-07 22:33:38 +00:00
Albert Astals Cid
52f07d216e Merge remote-tracking branch 'origin/release/20.08' into master 2020-08-08 00:32:39 +02:00
Albert Astals Cid
b0bb617c95 buildPen: honor annotation opacity
Otherwise changing the opacity of lines/arrows does nothing
2020-08-08 00:32:03 +02:00
Albert Astals Cid
3a331b782e PagePainter: Don't draw Arrow/Line annotations with multipyl
Otherwise they will be transparent when they shouldn't

BUGS: 425075
2020-08-08 00:32:03 +02:00
Albert Astals Cid
35da58a152 Merge branch 'release/20.08' into master 2020-08-08 00:12:46 +02:00
Albert Astals Cid
5185c6b371 buildPen: honor annotation opacity
Otherwise changing the opacity of lines/arrows does nothing
2020-08-07 00:36:29 +02:00
Albert Astals Cid
c171e5aecc PagePainter: Don't draw Arrow/Line annotations with multipyl
Otherwise they will be transparent when they shouldn't

BUGS: 425075
2020-08-07 00:35:00 +02:00
David Hurka
2c70ec41ad PresentationWidget: Fix screen switching at runtime
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.
2020-08-07 00:34:19 +02:00
Albert Astals Cid
648580a6f7 Merge remote-tracking branch 'origin/release/20.08' into master 2020-08-07 00:14:35 +02:00
David Hurka
93e67cca93 Port away from QDesktopWidget
This ports Shell from QDesktopWidget to QScreen (trivial),
and removes unused QDesktopWidget includes (super-trivial).
2020-08-05 23:24:36 +00:00
Simone Gaiarin
72f5a2db08 Find built-in tool corresponding to quick tool at runtime
In this way it is possible to drop the `sourceId` attribute from the quick tools definition. This simplifies the code logic and makes it easier to update user settings from the previous version of Okular (because there is no need to add the attribute `sourceId`

This also fixes the crash due to the fact that `sourceId` was not correctly created when a quick annotation is created from the Annotation page of Okualr Settings.

BUG: 424810
FIXED-IN: 1.11.0
2020-08-05 22:49:56 +00:00
Christoph Feck
a969bb9168 Merge branch 'master' of invent.kde.org:graphics/okular 2020-08-05 09:54:16 +02:00
Christoph Feck
f6ce4a57d8 GIT_SILENT Update Appstream for new release 2020-08-05 09:52:57 +02:00
Christoph Feck
d0b9d83946 GIT_SILENT Update Appstream for new release
(cherry picked from commit f6ce4a57d8)
2020-08-05 09:52:57 +02:00
Albert Astals Cid
5cae4890f7 Merge remote-tracking branch 'origin/release/20.08' into master 2020-08-05 00:06:44 +02:00
Albert Astals Cid
3c634a4fff Increase version
GIT_SILENT
2020-08-05 00:06:03 +02:00
David Hurka
cd79b9b421 Improve PagePainter and LineAnnotPainter documentation
Write doxygen documentation for:
* PagePainter::paintPageOnPainter(), paintCroppedPageOnPainter()
* `Change Colors` algorithm functions of PagePainter
* PagePainter::drawShapeOnImage(), drawPixmapOnImage(); very straightforward,
  but added a note on the coordinate system.
* LineAnnotPainter constructor, draw()

Remove unused functions:
* PagePainter::cropPixmapOnImage(), QPixmap::copy() can do it easily today.
2020-08-01 17:08:50 +00:00
Christoph Feck
dcce5637b6 GIT_SILENT Upgrade release service version to 20.07.90. 2020-07-31 23:14:21 +02:00
David Hurka
50df8ad877 Fix misplacement of some non-PDF annotations on hiDPI
PagePainter::drawShapeOnImage() and drawEllipseOnImage() didn’t respect the image’s device pixel ratio.

Steps to reproduce:
* Set your screen scale to e. g. 1.25.
* Open e. g. a .txt document.
* Draw e. g. an arrow annotation or a text markup annotation.
2020-07-31 00:04:21 +00:00
David Hurka
3ed69d2f60 QPainter can setOpacity() now, use that instead of PagePainter::changeImageAlpha(). That saves bit manipulation and deep copies. 2020-07-30 21:56:05 +00:00
l10n daemon script
36a6010c4f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-07-30 09:32:05 +02:00
l10n daemon script
8f81af09e2 GIT_SILENT made messages (after extraction) 2020-07-30 07:58:09 +02:00
l10n daemon script
8563aa45cb SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-07-30 05:49:55 +02:00
l10n daemon script
685ae66b45 GIT_SILENT made messages (after extraction) 2020-07-30 02:13:37 +02:00
Albert Astals Cid
560b785fdf Merge remote-tracking branch 'origin/release/20.08' 2020-07-28 23:06:10 +02:00
Simone Gaiarin
b6e2da073b Add required Version key to kconf_update file
Without the Version=5 the update file is not processed by kconf_update

BUG: 424616
FIXED-IN: 1.11.0
2020-07-28 21:05:35 +00:00
l10n daemon script
3ef3de28c8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-07-25 05:29:31 +02:00
Albert Astals Cid
1f5497f6aa Merge remote-tracking branch 'origin/release/20.08' 2020-07-23 23:46:23 +02:00
Simone Gaiarin
00118158b9 Test that 'Quick Annotations' is correctly populated 2020-07-23 20:58:06 +00:00
Simone Gaiarin
d31ec70726 Test enabled/disabled state of actions after a config reparsing 2020-07-23 20:58:06 +00:00
Simone Gaiarin
20b298cfd2 Test enabled state of "Quick Annotations" action 2020-07-23 20:58:06 +00:00
Simone Gaiarin
558742a009 Ensure "Quick annotations" action is always disabled on protected pdf
If the annotations are disabled in the current pdf we can skip repopulating "Quick annotations" and in this way we also assure that the enabled/disabled state of the action is preserved upon configuration reparsing.

d->toolsEnabled must be initialized to true, in order to correctly populate the "Quick annotations" action the first time for non-protected pdf, given that setToolsEnabled is called after the first call to populateQuickAnnotations.

BUG: 424296
FIXED-IN: 1.11.0
2020-07-23 20:58:06 +00:00
Albert Astals Cid
1eb724b5be Convert the poppler revisions to Okular revisions
It's not really like it matters since we're not using the okular
revision information anywhere, but well, at least from the poppler
plugin we're doing the right thing
2020-07-23 08:44:53 +00:00
Albert Astals Cid
2c8dd71931 Convert the poppler annotation popup to Okular annotation window
Not having this is not as bad as it sounds since for most of the
annotations where the style makes sense this is currently already being
converted by AnnotationPrivate::setAnnotationProperties but the plan is
to stop passing xml between poppler annotations and okular annotations
because that's just plain bad
2020-07-23 08:44:53 +00:00
Albert Astals Cid
2b639579f7 Convert the poppler annotation style to Okular annotation the style
Not having this is not as bad as it sounds since for most of the
annotations where the style makes sense this is currently already being
converted by AnnotationPrivate::setAnnotationProperties but the plan is
to stop passing xml between poppler annotations and okular annotations
because that's just plain bad
2020-07-23 08:44:53 +00:00
Albert Astals Cid
5ce3593e8f createAnnotationFromPopplerAnnotation: Renames to make the code easier to read
It's not clear ann was a popplerAnnotation but annotation was an
okularAnnotation
2020-07-23 08:44:53 +00:00
Albert Astals Cid
4e89757af1 Poppler: Use non xml API for toc if possible
The xml api will be removed in Qt6 so better to move away from it as
soon as possible
2020-07-23 07:49:38 +00:00
l10n daemon script
52acaf3a9a GIT_SILENT made messages (after extraction) 2020-07-23 08:16:09 +02:00
l10n daemon script
88e6eadc99 GIT_SILENT made messages (after extraction) 2020-07-23 02:17:39 +02:00
Albert Astals Cid
9dcb5bc36b Use KXMLGUIClient::findVersionNumber if using new enough xmlgui
instead of the code we copied from there
2020-07-20 00:16:21 +02:00
René van Paassen
ab7ae92a89 Annotations: explicitly accept tablet event when it is handled
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
2020-07-17 17:52:10 +02:00
David Hurka
861b5a58a0 Revert last commit (accept events) to fix author information
This reverts commit 15ac564b93.
2020-07-17 17:45:04 +02:00
David Hurka
15ac564b93 Annotations: explicitly accept tablet event when it is handled
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
2020-07-16 22:58:29 +00:00
David Hurka
34708565ca Add Constrain Angle action for annotation tools, alternative to pressing Shift
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
2020-07-16 22:32:42 +00:00
Simone Gaiarin
bba13ee566 Add tooltip to "Quick Annotations" 2020-07-16 20:32:23 +02:00
Simone Gaiarin
166f36565d Move "Quick Anotations" action next to selection tools
Partially addresses #15
2020-07-16 08:57:59 +02:00
Albert Astals Cid
5432541dfa Merge remote-tracking branch 'origin/release/20.08' 2020-07-14 23:42:38 +02:00
Simone Gaiarin
f2338f4022 Make connection unique for annotation visibility actions
This event is sent three times at startup and two times per tab at tab
change, so let's make sure we setup the connections only once.
2020-07-14 19:51:33 +00:00
Simone Gaiarin
1a581c4135 Do not setup actions on tab destruction
The toolbar actions must be setup only when a tab is selected thus
activating a different part, while nothing should happen when a tab
is closed.

BUG 423335
2020-07-14 19:51:33 +00:00
Nate Graham
d8198732f8 Merge branch 'release/20.08' 2020-07-14 09:36:41 -06:00