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
* 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.
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.
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
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
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.
* 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.
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
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.
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
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.
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.