From 0b5a1100ff5ab4fb696e0efc9bc5e8f266cf40ae Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Mon, 23 Mar 2020 11:08:23 +0100 Subject: Doc: Adjust offline style for the litehtml rendering engine Qt Creator now has the option to use the litehtml backend as a replacement for the QTextBrowser-based help viewer. Fix a few issues that the offline style has with the litehtml renderer: - Fall back to using an unordered list for the navigation bar. - Remove the background image for #buildversion and adjust font size. - Adjust the generated padding around code snippets. Keep the script that switches the offline-simple.css style to the full offline style (offline.css) for JavaScript-enabled browsers. The litehtml backend in Qt Creator will handle this switch internally. With these changes, the generated offline documentation looks acceptable when rendered with QTextBrowser, litehtml, or desktop web browsers. Fixes: QTBUG-82567 Change-Id: I86b179b1985b7ef54feddab30cb227b28021efe5 Reviewed-by: Leena Miettinen --- .../qt-html-templates-offline-simple.qdocconf | 22 +++------------------- doc/global/template/style/offline.css | 5 ++++- 2 files changed, 7 insertions(+), 20 deletions(-) (limited to 'doc/global') diff --git a/doc/global/qt-html-templates-offline-simple.qdocconf b/doc/global/qt-html-templates-offline-simple.qdocconf index c3c2d3cca0..02a3228519 100644 --- a/doc/global/qt-html-templates-offline-simple.qdocconf +++ b/doc/global/qt-html-templates-offline-simple.qdocconf @@ -19,27 +19,11 @@ HTML.headerstyles = \ " }, 0);\n" \ " \n" -HTML.postheader = \ - "\n" \ - "
\n"\ - "
\n" \ - "
\n" \ - "
\n" \ - " \n" - -HTML.postpostheader = \ - "
\n"\ - "
\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - "
\n" - HTML.navigationseparator = \ "\n" # Add some padding around code snippets, as we cannot # currectly style them for QTextBrowser using only CSS. -codeindent = 2 -codeprefix = "\n\n" -codesuffix = "\n\n" +codeindent = 1 +codeprefix = "\n" +codesuffix = "\n" diff --git a/doc/global/template/style/offline.css b/doc/global/template/style/offline.css index 13c942707a..f99369a096 100644 --- a/doc/global/template/style/offline.css +++ b/doc/global/template/style/offline.css @@ -297,11 +297,14 @@ table.buildversion { #buildversion { font-style: italic; - font-size: small; float: right; margin-right: 5px; } +#buildversion a { + background: none; +} + /* /* table of content -- cgit v1.2.3