~ubuntu-branches/debian/experimental/calibre/experimental

« back to all changes in this revision

Viewing changes to src/calibre/gui2/book_details.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2012-03-03 22:02:28 UTC
  • mfrom: (1.3.31)
  • Revision ID: package-import@ubuntu.com-20120303220228-kcahn2y83sh71bgh
Tags: 0.8.41+dfsg-1
* New upstream release.
* debian/control: Add libpoppler-private-dev build dependency, thanks Pino
  Toscano. (Closes: #660114)

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
                ans = unicode(col.name())
39
39
        return ans
40
40
 
41
 
    f = QFontInfo(QApplication.font(widget)).pixelSize()
 
41
    fi = QFontInfo(QApplication.font(widget))
 
42
    f = fi.pixelSize()+1
 
43
    fam = unicode(fi.family()).strip().replace('"', '')
 
44
    if not fam:
 
45
        fam = 'sans-serif'
 
46
 
42
47
    c = color_to_string(QApplication.palette().color(QPalette.Normal,
43
48
                    QPalette.WindowText))
44
49
    templ = u'''\
45
50
    <html>
46
51
        <head>
47
52
        <style type="text/css">
48
 
            body, td {background-color: transparent; font-size: %dpx; color: %s }
 
53
            body, td {
 
54
                background-color: transparent;
 
55
                font-size: %dpx;
 
56
                font-family: "%s",sans-serif;
 
57
                color: %s
 
58
            }
49
59
        </style>
50
60
        <style type="text/css">
51
61
            %s
55
65
        %%s
56
66
        </body>
57
67
    <html>
58
 
    '''%(f, c, css)
 
68
    '''%(f, fam, c, css)
59
69
    fm = getattr(mi, 'field_metadata', field_metadata)
60
70
    fl = dict(get_field_list(fm))
61
71
    show_comments = (all_fields or fl.get('comments', True))