Commit graph

9149 commits

Author SHA1 Message Date
Simone Gaiarin
cd96735ae2 Maintain quick annotation shortcut compatibility with Okular < 1.11.0
During the upgrade to Okular 1.11.0 the shortcuts for the quick annotations have been changed from the keys 1, 2, 3,... to Alt + 1, 2, 3,... making some users unhappy.

CCBUG: 426009
2020-09-06 10:08:19 +00:00
Albert Astals Cid
f25387681b Don't always show the signature message ^_^
Fix regression in a05df764bc
2020-09-06 10:50:29 +02:00
Albert Astals Cid
cbddcd3273 kwallet and kjs are mandatory in cmake anyway, remove ifdefs 2020-09-05 23:50:45 +00:00
Albert Astals Cid
a05df764bc Move IsDigitallySigned code to part.cpp
It isn't really pdf generator specific
2020-09-05 19:33:47 +00:00
David Hurka
076e17c608 Create GuiUtils functions createColorIcon() and createOpacityIcon()
* createColorIcon creates a QIcon which visualizes the given colors
  using rectangles. A background icon can be provided, in that case
  only the lowest 25% of the icon will be filled by the rectangles.
* createOpacityIcon creates a QIcon that visualizes a given opacity
  using the current foreground color and a checkerboard background.

These functions are now used in place of colorIcon, colorPicerIcon,
opacityIcon in AnnotationActionHandler. The new functions have some
advantages: support most common icon sizes, and dark color schemes.
2020-09-03 11:02:13 +00:00
Nicolas Fella
3cc016b6ab Drop empty X-KDE-PluginInfo-Depends
The whole concept is almost unused and there's no point in having it there but empty

See also https://phabricator.kde.org/T13553
2020-09-01 14:13:36 +02:00
Christoph Feck
b3101774cf GIT_SILENT Update Appstream for new release
(cherry picked from commit 4b9e50a1ed)
2020-08-31 21:02:07 +02:00
Christoph Feck
4b9e50a1ed GIT_SILENT Update Appstream for new release 2020-08-31 21:02:06 +02:00
Christoph Feck
ad5e40826c GIT_SILENT Upgrade release service version to 20.08.1. 2020-08-31 20:35:27 +02:00
Albert Astals Cid
18837e69e5 Merge remote-tracking branch 'origin/release/20.08' into master 2020-08-31 19:20:37 +02:00
Laurent Montel
69776168e2 Using no deprecated enum Qt::MiddleButton
(cherry picked from commit c022b05457)
2020-08-31 17:18:36 +02:00
Laurent Montel
c022b05457 Using no deprecated enum Qt::MiddleButton 2020-08-31 17:18:09 +02:00
Simone Gaiarin
bc2d22910a Improve robustness of code against corrupted configurations
Perform extra checks on the existence of QDomElement attributes and on the correctness of their conversion from QString to int.

This also prevents a crash if it is not possible to find the built in tool associated to the triggered quick tool.
2020-08-30 23:33:20 +02:00
Albert Astals Cid
27ad1bbb31 Merge remote-tracking branch 'origin/release/20.08' into master 2020-08-30 19:29:18 +02:00
Albert Astals Cid
04d92f5847 File dialog: Use mimetypes instead of file extensions
Only if you're on a new enough KIO, we need
a1acb7744455b57dc972b3073f6e1dce0d49d965
and
7bf4d793a5ac54280c45660dbd04de4fa99dc994
present since 5.73 to make the UI usable

BUGS: 422574
2020-08-28 21:56:07 +00:00
Simone Gaiarin
10d92fbeda Store the state of the builtin annotations in a new config key
Using the new configuration key BuiltinAnnotationTools instead of AnnotationTools, we avoid any conflicts in the configuration files due to the fact that the key AnnotationTools had a different meaning in the previous versions of Okular. In particular we avoid the critical problem that the actions in the UI do not match the actual annotation tools. The conflict may happen if the kconf_update script is not executed for some reason (e.g. okular running from flatpack).

BUG: 425354
FIXED-IN: 1.11.1
2020-08-25 10:16:10 +02:00
Albert Astals Cid
8966b715b6 poppler: Convert Line annotations via C++
Instead of via the magic XML cycle of Poppler::AnnotationUtils::storeAnnotation + Okular::AnnotationUtils::createAnnotation
2020-08-22 23:38:53 +00:00
Albert Astals Cid
884704f6cb poppler: Convert Text annotations via C++
Instead of via the magic XML cycle of Poppler::AnnotationUtils::storeAnnotation + Okular::AnnotationUtils::createAnnotation
2020-08-22 23:38:53 +00:00
Markus Brenneis
89cf21b222 Add support for image sizes in markdowns
The discount markdown parser supports parsing explicit image sizes in markdown, but we ignore them and replace them with the actual image dimensions. With this patch, any specified image sizes are respected.
2020-08-22 23:32:27 +00:00
Albert Astals Cid
511fc7acca Document the valid int values for TextAnnotation::setInplaceAlignment 2020-08-21 15:35:32 +02:00
David Hurka
89280e82d7 Port PresentationWidget to QScreen and simplify related code
* 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.
2020-08-09 22:01:10 +00:00
Albert Astals Cid
60efe8f019 Merge remote-tracking branch 'origin/release/20.08' into master 2020-08-08 17:13:32 +02:00
Albert Astals Cid
9b9ce9e3a6 Merge branch 'release/20.08' into master 2020-08-08 12:49:48 +02:00
Albert Astals Cid
caa351c723 Bookmarks: Resolve symlinks before using an url
If a symlink points to another file, we should use that file as
canonical source for bookmarks, it doesn't make sense to have two
different sets of bookmarks for two paths that are essentially the same
file

BUGS: 424340
2020-08-07 22:34:30 +00:00
Albert Astals Cid
1c7c7275e1 buildPen: honor annotation opacity
Otherwise changing the opacity of lines/arrows does nothing
2020-08-07 22:33:38 +00:00
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