Make usernames of non-controllers in controlled rooms grey

This commit is contained in:
Et0h 2014-10-24 23:04:14 +01:00
parent 2aa7b50ac6
commit 3edda78143
2 changed files with 3 additions and 0 deletions

View File

@ -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

View File

@ -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'])))