Summary: | make it possible to resize resizable annotations | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | albert <alberthilbert> |
Component: | general | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | aacid, alessanderbotti, bastianholst, claude.xavier, codestruct, diego.ml, fraph24, g11072813, giecrilj, haxtibal, kan.nokt, matpen, naitreey, navid.htb, nono31393, oliver.sander, rhunger, rikudou__sennin, simonandric5, thebigming, will |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Unspecified | ||
Latest Commit: | https://commits.kde.org/okular/0957abc39ad0597140b068b6f083371df84acf16 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Patch to add annotation resize feature (intermediate result) |
Description
albert
2008-12-14 14:59:32 UTC
Actually, not an issue of stamps, but of annotations in general. *** Bug 183543 has been marked as a duplicate of this bug. *** *** Bug 253843 has been marked as a duplicate of this bug. *** *** Bug 291281 has been marked as a duplicate of this bug. *** *** Bug 327679 has been marked as a duplicate of this bug. *** Really??? I don't believe after *6 years* it's still unable to resize inline note. The text boxes don't resize themselves when you modify text either. This is annoying when going from longer text to shorter text, but makes the box useless when going from a shorter to longer annotation as the text is obscured. the pop-up notes are big, they hide words, i can't put them between words i am working on Kubuntu 14.04LTS with okular version 0.19.3 Still not possible to resize/move annotations in Okular 0.20.2. (In reply to Naitree Zhu from comment #6) > Really??? I don't believe after *6 years* it's still unable to resize inline > note. I'm with you - & it's 7 years now thebigming Time goes by really fast sometimes. :) What about starting to crowd-fund this issue? See for example http://cffsw.modernthings.org/ which was about translating a Debian handbook. I wonder if there are examples from the KDE world where specific bugs were resolved by funding a programmer. The Berlin office of KDAB got hired several times to implement support for embedded movies in okular. That worked out very nicely. Created attachment 97686 [details]
Patch to add annotation resize feature (intermediate result)
As posted to okular-devel on 2016-02-28, I'm currently working on that bug. It's my first work on okular and the changes are not finished for sure. But I'll just add the current diff to show you an intermediate result. Maybe someone can tell me if I'm on the right track. Btw., I'll be back at my computer not before Sunday evening:)
To perform the resize:
-move mouse over a annotation, press ctrl => and a boundary rectangle with resize-handles will show
-left click on one of the handles, keep ctrl pressed, and move mouse to resize the annotation
I've only tested this with inline notes so far.
Please use reviewboard.kde.org for patches Git commit 0957abc39ad0597140b068b6f083371df84acf16 by Albert Astals Cid, on behalf of Tobias Deiminger. Committed on 19/03/2017 at 22:18. Pushed by aacid into branch 'master'. Add annotation resize functionality Usage: If you left-click an annotation, it gets selected. Resize handles appear on the selection rectangle. When cursor is moved over one of the 8 resize handles on the corners/edges, the cursor shape changes to indicate resize mode. Everywhere else on the annotation means "move", just as it was before resize feature was added. Pressing ESC or clicking an area outside the annotation cancels a selection. Pressing Del deletes a selected annotation. Feature is only applicable for annotation types AText, AStamp and AGeom. Implementation: It works by eventually changing AnnotationPrivate::m_boundary and notifying generator (i.e. poppler) about that change. Annotation state handling is shifted out of PageView into a new class MouseAnnotation (ui/pageviewmouseannotation.cpp). Some functionality not related to resizing but to annotation interaction in general is also shifted to class MouseAnnotation, to build a single place of responsiblity. Other changes: Add method Document::adjustPageAnnotation, backed by a QUndoCommand. class Okular::AdjustAnnotationCommand. Add Annotation::adjust and Annotation::canBeResized methods. Draw resize handles in PagePainter::paintCroppedPageOnPainter. Resize and move work -for types AText, AStamp and AGeom -on all pages of document -when viewport position changes -when zoom level changes -for all page rotations (0°, 90°, 180°, 270°) Selection is canceled -when currently selected annotation is deleted -on mouse click outside of currently selected annotation -ESC is pressed Viewport is shifted when mouse cursor during move/resize comes close to viewport border. Resize to negative is prevented. Tiny annotations are still selectable. If mouse is moved over an annotation type that we can focus, and the annotation is not yet focused, mouse cursor shape changes to arrow. If mouse cursor rests over an annotation A, while annotation B is focused, a tooltip for annotation A is shown. Selected Annotation is deleted when Del is pressed. Test for regressions: -Annotation interaction (focus, move, resize, start playback, ...) are only done in mode EnumMouseMode::Browse. -If mouse is moved over an annotation type where we can start an action, mouse cursor shape changes to pointing hand. -If mouse is moved over an annotation type that we can't interact with, mouse cursor shape stays a open hand. -If mouse cursor rests over an annotation of any type, a tooltip for that annotation is shown. -Grab/move scroll area (on left click + mouse move) is prevented, if mouse is over focused annotation, or over AMovie/AScreen/AFileAttachment annotation. -A double click on a annotation starts the "annotator". REVIEW: 127366 Related: bug 314843, bug 358060 M +1 -0 CMakeLists.txt M +58 -2 core/annotations.cpp M +16 -1 core/annotations.h M +2 -0 core/annotations_p.h M +13 -6 core/document.cpp M +14 -1 core/document.h M +2 -2 core/document_p.h M +65 -0 core/documentcommands.cpp M +26 -0 core/documentcommands_p.h M +1 -1 generators/poppler/annots.cpp M +5 -2 ui/pagepainter.cpp M +76 -189 ui/pageview.cpp A +714 -0 ui/pageviewmouseannotation.cpp [License: GPL (v2+)] A +164 -0 ui/pageviewmouseannotation.h [License: GPL (v2+)] https://commits.kde.org/okular/0957abc39ad0597140b068b6f083371df84acf16 |