Summary:
Seems like someone forgot to consistently apply a change. Maybe the path
construction should be factored into a reusable lambda?
Test Plan:
Open Okular, open settings > configure Okular. Without the patch, you'll get a
"QFSFileEngine::open: No file name specified" warning, with the patch it
disappears. Note that there is also an unrelated "Illegal icon group: 7"
warning from KIconThemes, but I'm 99% certain that this is on KIconThemes doing
a bogus check in KIconEffect::apply, not on Okular
Reviewers: #okular, hetzenecker, aacid
Reviewed By: #okular, aacid
Subscribers: aacid, #okular
Tags: #okular
Differential Revision: https://phabricator.kde.org/D12001
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
It's not part of the standard and GCC recently removed support for it
Looking at the code it seems we only need one external check, let's hope i'm right :D
So that the hoverIcon is not shown above the newly created annotation.
This was especially visible if the creation of the annotation triggers a
message box warning, because one could see both the annotation and the
hover icon as long as the warning wasn't closed.
Note that if a low-res 16x16 version is available, it is shown instead
of the 64x64 version actually used by PagePainter.
e.g. try with the default stamp "Okular"
- Changed property dialog title from "Highlight" to "Text Markup",
because it's used for Underline, Squiggle and Strike out too.
- Renamed Squiggly (adjective) to Squiggle (noun)
- Show the precise type of HighlightAnnotation in the review panel and
on right-click on a HighlightAnnotation
Removed name attribute from default tools (ie those from tools.xml), so
that they now get default names, which automatically translated if the
application language is switched.
With this patch, tools.xml no longer contains strings to be translated.
NOTE: Messages.sh was not tested
Two purposes:
- Have tooltips available even for user-created annotations (not just
the predefined ones)
- Avoid i18n strings in settings (NOTE: the "name" attribute will be
removed in next patch)
Some tooltips were created over new (eg for new tools), some were
rewritten to actually give instructions instead of repeating the name of
the tool, some were rewritten to avoid references to colors (because
colors are no longer fixed)
Since the size of pixmap is determined by the value of size variable,
we can directly read that variable instead of querying the pixmap.
Also note that "pixmap" comes from "hoverIcon", not from "icon", and
that piece of code wants to know the size of the latter. In case of
stamp annotations, however, they happen to be the same.
Note that previously the width attrubute was ignored by the PolyLine
engine and it always set width=1, that's why I had to change the default
value in tools.xml.
So that they are the same color as the annotations they create.
This patch also adds some new icons.
Affected annotation tools:
- Ellipse
- Polygon
- Rectangle (NEW)
- Squiggly (NEW)
- Line
- Strikeout (NEW)
- Underline
I'll edit the remaining icons in next patches.
Translate strings when retrieving the default annotation tool list, so
that we can assume that strings in the AnnotationTools setting are
translated.
Note: In future patches, I'll remove i18n strings from the default tool
list at all
Instead of using a system-wide tools.xml file containing a list of
<tool>...</tool> elements, store each tool element as string in a
stringlist configuration option.
Note that the global tools.xml file is still needed to read the
default values.