Summary:
Changing typewriter text color can be done in the typewriter properties dialog, or programmatically via new okular API methods TextAnnotation::textColor and TextAnnotation::setTextColor.
poppler >= 0.69 is required to store text color natively inside PDF documents. For other document types, text color is stored as metadata inside the document archive.
This work was done during GSoC 2018. See https://community.kde.org/GSoC/2018/StatusReports/DileepSankhla for details.
Test Plan:
- properties dialog of typewriter annotation has "Font Color" picker
- saving to PDF results in <r> <g> <b> rg operation in /DA
- saving to archive results in fontColor="rrggbb" attribute in metadata.xml
Reviewers: sander
Reviewed By: sander
Subscribers: kde-doc-english, sander, okular-devel
Tags: #okular, #documentation
Differential Revision: https://phabricator.kde.org/D15205
Summary:
Typewriter is originally specified by the PDF reference as special FreeText annotation, where Intent=FreeTextTypewriter. It features opaque letters on transparent background, so that users can fill non interactive forms. Herewith typewriter is implemented natively for PDF, and there's also an Okular specific implementation for other document types. The added tool reuses the inline note UI.
This work was done during GSoC 2018. See https://community.kde.org/GSoC/2018/StatusReports/DileepSankhla for details.
FEATURE: 353401
Test Plan:
- okularpartrc is generated (if not yet existing) with typewriter as 10th tool
- typewriter tool is also available in Annotation Tools -> Add, Typ "Typewriter"
- selecting the tool and left click into document opens inline note input dialog
- finishing creates an annotation similar to inline note, but with transparent background
- saving into PDF results in /Subtype FreeText /IT /FreeTextTypeWriter
- saving typewriter into archive stores color with alpha channel = 0x00
- opening annotated archive works, if archive was created with old Okular, and opened in patched Okular
- opening annotated archive works, if archive was created with patched Okular, and opened in old Okular
Reviewers: sander
Reviewed By: sander
Subscribers: ngraham, sander, okular-devel
Tags: #okular
Differential Revision: https://phabricator.kde.org/D15204
- Use a QPixmap object instead of a QPixmap*
Quote from the QPixmap documentation:
"QPixmap objects can be passed around by value
since the QPixmap class uses implicit data sharing."
- Replace another pointer by std::unique_ptr
Differential Revision: https://phabricator.kde.org/D15301
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.