[Okular-devel] Review Request 127013: Properly show marker for current section in TOC

Albert Astals Cid aacid at kde.org
Mon Feb 29 23:53:12 UTC 2016



> On Feb. 29, 2016, 11:52 p.m., Albert Astals Cid wrote:
> > I was going to commit this but then i realized I can't because it will crash the mobile version. In documentitem.cpp the parent of the model is not a view.
> > 
> > This highlights a problem with the patch, it accesses the view from the model, that is wrong, ideally models don't know about their views.
> > 
> > My suggestion to workaround this problem is this: 
> > * Leave the decoration role as it is  (as deprecated for the mobile version)
> > * Introduce a new role named someting like PathToLeaf that returns the arrow item for the whole path (except the leaf) (for that we do not need view info)
> > * In pageitemdeleate (that is tied to the view) you can inspect the view expanded/collapsed status + the new role to decide whether to draw the triangle or not for the non leaf
> > 
> > Does that sound doable?

Stupid markdown processing, i meant
 * Leave the decoration role as it is (as deprecated for the mobile version)
 * Introduce a new role named someting like PathToLeaf that returns the arrow item for the whole path (except the leaf) (for that we do not need view info)
 * In pageitemdeleate (that is tied to the view) you can inspect the view expanded/collapsed status + the new role to decide whether to draw the triangle or not for the non leaf


- Albert


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


On Feb. 27, 2016, 10:30 a.m., Miklós Máté wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127013/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2016, 10:30 a.m.)
> 
> 
> Review request for Okular.
> 
> 
> Repository: okular
> 
> 
> Description
> -------
> 
> fixes bug #342076
> 
> 
> Diffs
> -----
> 
>   ui/tocmodel.cpp ce93366 
> 
> Diff: https://git.reviewboard.kde.org/r/127013/diff/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> okular_marker_v2.diff
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/02/27/78357c93-a723-4e1b-8a8d-638d49ed334e__okular_marker_v2.diff
> okular_marker_v2.diff
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/02/27/c4395f9d-2991-4f6c-bf36-d973dbcb5b64__okular_marker_v2.diff
> 
> 
> Thanks,
> 
> Miklós Máté
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20160229/1a91b1e5/attachment-0001.html>


More information about the Okular-devel mailing list