From 3edda78143ac7af6bdedfb35b7cb8377a7a89716 Mon Sep 17 00:00:00 2001 From: Et0h Date: Fri, 24 Oct 2014 23:04:14 +0100 Subject: [PATCH] Make usernames of non-controllers in controlled rooms grey --- syncplay/constants.py | 1 + syncplay/ui/gui.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/syncplay/constants.py b/syncplay/constants.py index 9bd0065..c300163 100644 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -106,6 +106,7 @@ STYLE_USERNAME = "color: #367AA9; font-weight:bold;" STYLE_ERRORNOTIFICATION = "color: red;" STYLE_DIFFERENTITEM_COLOR = 'red' STYLE_NOFILEITEM_COLOR = 'blue' +STYLE_NOTCONTROLLER_COLOR = 'grey' MPLAYER_SLAVE_ARGS = ['-slave', '--hr-seek=always', '-nomsgcolor', '-msglevel', 'all=1:global=4:cplayer=4'] # --quiet works with both mpv 0.2 and 0.3 diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 629408f..823490d 100644 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -122,6 +122,8 @@ class MainWindow(QtGui.QMainWindow): useritem = QtGui.QStandardItem(user.username) isController = user.isController() useritem.setData(isController, Qt.UserRole + constants.USERITEM_CONTROLLER_ROLE) + if isControlledRoom and not isController: + useritem.setForeground(QtGui.QBrush(QtGui.QColor(constants.STYLE_NOTCONTROLLER_COLOR))) if user.file: filesizeitem = QtGui.QStandardItem(formatSize(user.file['size'])) filedurationitem = QtGui.QStandardItem("({})".format(formatTime(user.file['duration'])))