Skip to content

Demo: ToC visual history

I wrote a mini PDF reader last year. https://moe.cat/@shenlebantongying/110095209734656727

One thing I am pretty happy about my toy PDF reader is a feature called "Visual History" that was copied from skim.app, a FOSS PDF reader on Mac.

The "Visiting history" will be highlighted on ToC, so that a user may jump back and force without losing track where he has been jumping around.

Not sure if this feature will be accepted. This requires disabling AlternatingRowColors which is true since 2006. The interaction with existing current selection highlighting and bold font for current page is weird (triple visual indicators 😅).

Okular Skim

AFAIK, skim.app is the only PDF reader that has this feature.

Implementation problems I have not figured out yet:

  • The ToC's background only got updated when the ToC in inactive by clicking somewhere else.
  • The QColor(194, 224, 245) is chosen because it is lighter than inactive selection. Not sure how to get the view's highlight color.
    • The existing highlight selection should be removed if this ever landed?
  • Does an option needed? In skim.app, there is no option and no doc mentioning "visual history ToC".
    • The current selection is highlighted, so the existing use case is not broken.
    • Extra visual traces doesn't look like something that will hurt someone.
Edited by shenleban tongying

Merge request reports

Loading