[Okular-devel] Review Request 115596: PageViewMessage - support for long messages

Luigi Toscano luigi.toscano at tiscali.it
Sat Feb 15 13:37:17 UTC 2014



> On Feb. 15, 2014, 12:24 p.m., Albert Astals Cid wrote:
> > I still feel it's a pixel too low, at lest the "Opened a document of 5 pages" message seems closer to the bottom line now than without the patch. If you'ree feeling i'm being too silly i can try to fix this thing myself :D

The way the bounding box is computed is a bit different so maybe a perfect match is not easy; you can try with changing line 377 in pageviewutils.cpp:
textYOffset = (geometry().height() - textRect.height() - detailsRect.height() - m_lineSpacing) / 2 + 1, 

but I felt it was one pixel too high - what do you think?


- Luigi


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115596/#review49818
-----------------------------------------------------------


On Feb. 12, 2014, 11:04 p.m., Luigi Toscano wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115596/
> -----------------------------------------------------------
> 
> (Updated Feb. 12, 2014, 11:04 p.m.)
> 
> 
> Review request for Okular.
> 
> 
> Repository: okular
> 
> 
> Description
> -------
> 
> So far the messages displayed by PageViewMessage are quite short (grep for "emit {error|warning|info}" in the code). The widget does not resize with long messages, nor does it resize on viewparent resize. The patch fixes this (with a bit of heuristic in the calculation of the boundary).
> 
> Side note: I originally thought about porting it to KMessageWidget, but it was more complex (with a different behavior in the end) that fixing it. On the other side, PageViewTopMessage is a better candidate for being ported (it's already used in layouts), but that's another story.
> 
> 
> Diffs
> -----
> 
>   ui/pageviewutils.h bc77cc9 
>   ui/pageviewutils.cpp 3f99248 
> 
> Diff: https://git.reviewboard.kde.org/r/115596/diff/
> 
> 
> Testing
> -------
> 
> Tested normally and --reverse. I will attach a patch that allows to quickly test it.
> 
> 
> File Attachments
> ----------------
> 
> Patch to test the change
>   https://git.reviewboard.kde.org/media/uploaded/files/2014/02/09/1f06fce0-68d5-4cb1-bd45-a1727e7e3789__test_longmessage.diff
> 
> 
> Thanks,
> 
> Luigi Toscano
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20140215/d5865f58/attachment.html>


More information about the Okular-devel mailing list