GNOME Bugzilla – Bug 449618
Top navigation bar is in the way
Last modified: 2007-09-22 19:52:23 UTC
I guess a lot of thought went into the navigation bar that gtk-doc puts on every documentation page. It is a nice feature, but it has usability problems. When you search for a term (using ctrl+f in Firefox), the match may come up behind bar. Firefox finds it but since its hidden behind the bar you wonder why it wasn't found. When printing the bar overwrites the top of all pages and makes the printout unusable. That wouldn't be a problem, except that there is no easy way to make pdfs with gtk-doc :(. And on small screens, the bar steals quite a lot of vertical space. I would be much happier with a navigation bar that is embedded in the page even if it means you have to press Home to access it.
The navigation bar should be styled out for printing with something like @media print { table.navigation { visibility: collapse; display: none; } } in style.css anyway.
That css-code would fix the printing problem, yes. It requires you to regenerate the docs with the modified stylesheet which requires you to have all gtk-doc tools plus the source for the GNOME package which you want to generate documentation for. That becomes an unreasonably big job if you want to print some modules documentation. Alternatively, all GNOME modules could put online printable versions of their documentation, but that is also a lot of work. Easiest way to fix it is, IMHO, just to make gtk-doc more printer-friendly.
The only thing gtk-doc does is generating the documentation. Any gtk-doc change to make it more printer-friendly -- actually any gtk-doc change at all -- requires to re-generate the documentation to take effect. Therefore I fail to see how the fact that one has to re-generate the documentation can be used as an argument against (or for) anything. I suggested the CSS printing fix (note it should also include the removal of the 3em space as below) because it is easy, noncontroversial (unlike the removal of top bar fixed positioning), and if one really want this, it can be even done easily with already generated documentation by editing a single file per package. No special tools and no unreasonably big jobs are involved. In fact, one can equally easily change the top bar from fixed to normally positioned with: --- style.css 2007-07-08 22:33:10.000000000 +0200 +++ style.css.nf 2007-07-08 22:33:07.000000000 +0200 @@ -30,11 +30,6 @@ border: solid 1px #ffaaaa; margin-top: 0; margin-bottom: 0; - position: fixed; - top: 0; - left: 0; - height: 2em; - z-index: 1; } .navigation a { @@ -57,8 +52,6 @@ div.refentry, div.chapter, div.part, div.book, div.index, div.glossary, div.sect1, div.appendix { position: relative; - top: 3em; - z-index: 0; } div.refnamediv { I don't know how to make this option easily available for users, though.
Created attachment 93306 [details] [review] different css for screen and print What about this patch? You can easily test changes using preint-preview in the browser. One thing that needs fixing still is that it hides the document name on the front page (as this uses the top navigation box).
Looks good! I'd still prefer getting rid of the fixed positioning entirely (for the document name issue and other problems), but that patch is better than nothing.
Created attachment 93390 [details] [review] different css for screen and print this keeps the titlepage box visible, but turns it into nonfixed. Is thsi now good enough to close the bug?
Björn, please reopen if needed. 2007-08-11 Stefan Kost <ensonic@users.sf.net> * style.css: Hide fixed navigationbar when printing. Fixes #449618