mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
2d6b895a90
commit
7711d58021
@ -444,6 +444,9 @@ xml_entity_to_unicode = partial(entity_to_unicode, result_exceptions = {
|
||||
def replace_entities(raw):
|
||||
return _ent_pat.sub(entity_to_unicode, raw)
|
||||
|
||||
def xml_replace_entities(raw):
|
||||
return _ent_pat.sub(xml_entity_to_unicode, raw)
|
||||
|
||||
def prepare_string_for_xml(raw, attribute=False):
|
||||
raw = _ent_pat.sub(entity_to_unicode, raw)
|
||||
raw = raw.replace('&', '&').replace('<', '<').replace('>', '>')
|
||||
|
@ -213,11 +213,13 @@ class BookInfo(QWebView):
|
||||
f = QFontInfo(QApplication.font(self.parent())).pixelSize()
|
||||
p = unicode(QApplication.palette().color(QPalette.Normal,
|
||||
QPalette.Base).name())
|
||||
c = unicode(QApplication.palette().color(QPalette.Normal,
|
||||
QPalette.Text).name())
|
||||
templ = u'''\
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
body, td {background-color: %s; font-size: %dpx}
|
||||
body, td {background-color: %s; font-size: %dpx; color: %s }
|
||||
a { text-decoration: none; color: blue }
|
||||
</style>
|
||||
</head>
|
||||
@ -225,7 +227,7 @@ class BookInfo(QWebView):
|
||||
%%s
|
||||
</body>
|
||||
<html>
|
||||
'''%(p, f)
|
||||
'''%(p, f, c)
|
||||
if self.vertical:
|
||||
if comments:
|
||||
rows += u'<tr><td colspan="2">%s</td></tr>'%comments
|
||||
|
104
src/calibre/gui2/comments_editor.py
Normal file
104
src/calibre/gui2/comments_editor.py
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user