mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Fix #1404234 [Icon not showing on Comments custom column](https://bugs.launchpad.net/calibre/+bug/1404234)
This commit is contained in:
parent
c7b18b6373
commit
9339ed74f1
@ -416,6 +416,11 @@ class CcCommentsDelegate(QStyledItemDelegate): # {{{
|
|||||||
else option.widget.style()
|
else option.widget.style()
|
||||||
self.document.setHtml(option.text)
|
self.document.setHtml(option.text)
|
||||||
style.drawPrimitive(QStyle.PE_PanelItemViewItem, option, painter, widget=option.widget)
|
style.drawPrimitive(QStyle.PE_PanelItemViewItem, option, painter, widget=option.widget)
|
||||||
|
rect = style.subElementRect(QStyle.SE_ItemViewItemDecoration, option)
|
||||||
|
ic = option.icon
|
||||||
|
if rect.isValid() and not ic.isNull():
|
||||||
|
sz = ic.actualSize(option.decorationSize)
|
||||||
|
painter.drawPixmap(rect.topLeft(), ic.pixmap(sz))
|
||||||
ctx = QAbstractTextDocumentLayout.PaintContext()
|
ctx = QAbstractTextDocumentLayout.PaintContext()
|
||||||
ctx.palette = option.palette
|
ctx.palette = option.palette
|
||||||
if option.state & QStyle.State_Selected:
|
if option.state & QStyle.State_Selected:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user