[Okular-devel] Working on annotation resize function

Tobias Deiminger haxtibal at t-online.de
Sun Feb 28 20:40:20 UTC 2016


Hello okular developers,

thanks for this great software! I'm working on an annotation "resize" function 
(there seems to be a related bug report: https://bugs.kde.org/show_bug.cgi?
id=177778). My first take was to implement it in a similar fashion to the 
translate functionality. It's working for me now, but needs improvements for 
sure (e.g. regarding class design, and resize handles are not yet drawn). Do 
you like to discuss or review it? What's the preferred way, e.g. would I need 
to register for KDE reviewboard?

I did this changes because okular calculates the initial size for inline notes 
a bit to small, and so the last character of my entered text always get's 
cropped off when the note is rendered in the page. Additionally, there is no 
way to resize the annotation after creation. Those two in combination make 
inline notes almost unusable for daily work. It's a pity considering the great 
effort you've already put into annotations.

I found it easier to implement an annotation resize function. In contrast, the 
initial-size problem seems more fundamental: Annotations are rendered by 
poppler, but okular tries to calculate the required space in advance using 
QFontMetricsF::boundingRect. In my environment okulars guess is slightly wrong 
(too small). Maybe only poppler can know the really required space?

Cheers
Tobias


More information about the Okular-devel mailing list