Linux: fix selection highlight in MainWindow userList

Apparently, this fix is required also on Linux. The same fix used
for macOS is used, with automatic detection of the background
color.
This commit is contained in:
Alberto Sottile 2019-05-14 16:45:49 +02:00
parent 8f5b77c0bf
commit f6414c39cc

View File

@ -79,7 +79,7 @@ class UserlistItemDelegate(QtWidgets.QStyledItemDelegate):
userReady = currentQAbstractItemModel.data(itemQModelIndex, Qt.UserRole + constants.USERITEM_READY_ROLE)
isUserRow = indexQModelIndex.parent() != indexQModelIndex.parent().parent()
bkgColor = self.view.palette().color(QtGui.QPalette.Base)
if isUserRow and isMacOS():
if isUserRow and (isMacOS() or isLinux()):
blankRect = QtCore.QRect(0, optionQStyleOptionViewItem.rect.y(), optionQStyleOptionViewItem.rect.width(), optionQStyleOptionViewItem.rect.height())
itemQPainter.fillRect(blankRect, bkgColor)