mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-25 18:43:22 +02:00
...
This commit is contained in:
parent
5a4ea8c01c
commit
caaad44983
1 changed files with 3 additions and 1 deletions
|
|
@ -49,7 +49,9 @@ def to_doc(self, index, option=None):
|
|||
doc = QTextDocument()
|
||||
if option is not None and option.state & QStyle.State_Selected:
|
||||
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]
|
||||
doc.setDefaultStyleSheet(' * { color: %s }'%c)
|
||||
doc.setHtml(index.data().toString())
|
||||
|
|
|
|||
Loading…
Reference in a new issue