mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-31 10:34:37 +01:00
Fix #790
This commit is contained in:
parent
8cf8b56bcc
commit
cf3bb47fc3
1 changed files with 2 additions and 1 deletions
|
|
@ -143,7 +143,8 @@ def sizeHint(self, option, index):
|
|||
def paint(self, painter, option, index):
|
||||
style = QApplication.style()
|
||||
painter.save()
|
||||
QApplication.style().drawControl(QStyle.CE_ItemViewItem, option, painter)
|
||||
if hasattr(QStyle.CE_ItemViewItem):
|
||||
QApplication.style().drawControl(QStyle.CE_ItemViewItem, option, painter)
|
||||
highlight = getattr(index.model(), 'highlight_row', -1) == index.row()
|
||||
mode = QIcon.Active if highlight else QIcon.Normal
|
||||
pixmap = QIcon(index.model().data(index, Qt.DecorationRole)).pixmap(self.pixmap.size())
|
||||
|
|
|
|||
Loading…
Reference in a new issue