mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
6c199a6b58
commit
abbc03eeb9
@ -323,14 +323,19 @@ class Comments(QWebView): # {{{
|
|||||||
ans = unicode(col.name())
|
ans = unicode(col.name())
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
f = QFontInfo(QApplication.font(self.parent())).pixelSize()
|
fi = QFontInfo(QApplication.font(self.parent()))
|
||||||
|
f = fi.pixelSize()+1
|
||||||
|
fam = unicode(fi.family()).strip().replace('"', '')
|
||||||
|
if not fam:
|
||||||
|
fam = 'sans-serif'
|
||||||
|
|
||||||
c = color_to_string(QApplication.palette().color(QPalette.Normal,
|
c = color_to_string(QApplication.palette().color(QPalette.Normal,
|
||||||
QPalette.WindowText))
|
QPalette.WindowText))
|
||||||
templ = '''\
|
templ = '''\
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body, td {background-color: transparent; font-size: %dpx; color: %s }
|
body, td {background-color: transparent; font-family: %s; font-size: %dpx; color: %s }
|
||||||
a { text-decoration: none; color: blue }
|
a { text-decoration: none; color: blue }
|
||||||
div.description { margin-top: 0; padding-top: 0; text-indent: 0 }
|
div.description { margin-top: 0; padding-top: 0; text-indent: 0 }
|
||||||
table { margin-bottom: 0; padding-bottom: 0; }
|
table { margin-bottom: 0; padding-bottom: 0; }
|
||||||
@ -342,7 +347,7 @@ class Comments(QWebView): # {{{
|
|||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<html>
|
<html>
|
||||||
'''%(f, c)
|
'''%(fam, f, c)
|
||||||
self.setHtml(templ%html)
|
self.setHtml(templ%html)
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user