mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 16:43:40 +02:00
...
This commit is contained in:
parent
82bb29424f
commit
7445bae81f
1 changed files with 1 additions and 6 deletions
|
|
@ -26,18 +26,13 @@
|
|||
|
||||
class TagDelegate(QItemDelegate):
|
||||
|
||||
def __init__(self, parent):
|
||||
QItemDelegate.__init__(self, parent)
|
||||
self._parent = parent
|
||||
self.icon = QIcon(I('star.png'))
|
||||
|
||||
def paint(self, painter, option, index):
|
||||
item = index.internalPointer()
|
||||
if item.type != TagTreeItem.TAG:
|
||||
QItemDelegate.paint(self, painter, option, index)
|
||||
return
|
||||
r = option.rect
|
||||
model = self._parent.model()
|
||||
model = self.parent().model()
|
||||
icon = model.data(index, Qt.DecorationRole).toPyObject()
|
||||
painter.save()
|
||||
if item.tag.state != 0 or not config['show_avg_rating'] or \
|
||||
|
|
|
|||
Loading…
Reference in a new issue