Style tweaks: use css snippets to tweak book styles (#3944)

Adds a new menu "Style tweaks", with a few CSS snippets
that can make some things better with some books.
This commit is contained in:
poire-z
2018-05-12 23:24:43 +02:00
committed by GitHub
parent a9905c5129
commit 5b7664b064
7 changed files with 699 additions and 8 deletions

View File

@@ -509,9 +509,11 @@ function CreDocument:setFontHinting(mode)
self._document:setIntProperty("font.hinting.mode", mode)
end
function CreDocument:setStyleSheet(new_css)
logger.dbg("CreDocument: set style sheet", new_css)
self._document:setStyleSheet(new_css)
function CreDocument:setStyleSheet(new_css_file, appended_css_content )
logger.dbg("CreDocument: set style sheet:",
new_css_file and new_css_file or "no file",
appended_css_content and "and appended content ("..#appended_css_content.." bytes)" or "(no appended content)")
self._document:setStyleSheet(new_css_file, appended_css_content)
end
function CreDocument:setEmbeddedStyleSheet(toggle)