From f6414c39cc595876ca2f18e1a5c87181587377ca Mon Sep 17 00:00:00 2001 From: Alberto Sottile Date: Tue, 14 May 2019 16:45:49 +0200 Subject: [PATCH] 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. --- syncplay/ui/gui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index d239507..f155c2d 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -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)