mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
...
This commit is contained in:
parent
5a4ea8c01c
commit
caaad44983
@ -49,7 +49,9 @@ class RichTextDelegate(QStyledItemDelegate): # {{{
|
|||||||
doc = QTextDocument()
|
doc = QTextDocument()
|
||||||
if option is not None and option.state & QStyle.State_Selected:
|
if option is not None and option.state & QStyle.State_Selected:
|
||||||
p = option.palette
|
p = option.palette
|
||||||
c = p.color(p.Active, p.HighlightedText)
|
group = (p.Active if option.state & QStyle.State_Active else
|
||||||
|
p.Inactive)
|
||||||
|
c = p.color(group, p.HighlightedText)
|
||||||
c = 'rgb(%d, %d, %d)'%c.getRgb()[:3]
|
c = 'rgb(%d, %d, %d)'%c.getRgb()[:3]
|
||||||
doc.setDefaultStyleSheet(' * { color: %s }'%c)
|
doc.setDefaultStyleSheet(' * { color: %s }'%c)
|
||||||
doc.setHtml(index.data().toString())
|
doc.setHtml(index.data().toString())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user