Created attachment 123194 [details] Screenshots SUMMARY When using highlighter with a djvu file, selected area is displaced after releasing the click. Please see screenshots to better understand what I mean. I can confirm that few months ago this was not happening, so probably this bug was introduced in later versions. Save file as .okular file before adding any annotation does not solve the problem. STEPS TO REPRODUCE 1. Open a djvu file 2. Try to highlight some text 3. Annotation is displaced to bottom a few lines SOFTWARE/OS VERSIONS Linux: 5.3.5 KDE Plasma Version: 5.16.5 KDE Frameworks Version: 5.62.0 Qt Version: 5.13.1 ADDITIONAL INFORMATION Only difference that I can think of from the past is that now I am using a hidpi monitor and I have activated a 1.5x scale in KDE settings.
That scale factor 1.5 could well be the source of your problem. Could you set the scaling to 1.0 and see if the problem persists?
What Oliver said
Yes, with scaling 1.0 it works fine.
But only with djvu files. Annotations in pdfs with 1.5x works fine.
Actually the bug is not particular to djvu files. I get the same behavior with plain text files, too.
... and the problem happens with different annotation tools, too. For example, with line annotations. That's because the calculations in LineAnnotationPainter (pagepainter.cc:990ff) are not taking the device pixel ratio into account.