mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #790
This commit is contained in:
parent
8cf8b56bcc
commit
cf3bb47fc3
@ -143,7 +143,8 @@ class LocationDelegate(QAbstractItemDelegate):
|
|||||||
def paint(self, painter, option, index):
|
def paint(self, painter, option, index):
|
||||||
style = QApplication.style()
|
style = QApplication.style()
|
||||||
painter.save()
|
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()
|
highlight = getattr(index.model(), 'highlight_row', -1) == index.row()
|
||||||
mode = QIcon.Active if highlight else QIcon.Normal
|
mode = QIcon.Active if highlight else QIcon.Normal
|
||||||
pixmap = QIcon(index.model().data(index, Qt.DecorationRole)).pixmap(self.pixmap.size())
|
pixmap = QIcon(index.model().data(index, Qt.DecorationRole)).pixmap(self.pixmap.size())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user