Make usernames of non-controllers in controlled rooms grey
This commit is contained in:
parent
2aa7b50ac6
commit
3edda78143
@ -106,6 +106,7 @@ STYLE_USERNAME = "color: #367AA9; font-weight:bold;"
|
|||||||
STYLE_ERRORNOTIFICATION = "color: red;"
|
STYLE_ERRORNOTIFICATION = "color: red;"
|
||||||
STYLE_DIFFERENTITEM_COLOR = 'red'
|
STYLE_DIFFERENTITEM_COLOR = 'red'
|
||||||
STYLE_NOFILEITEM_COLOR = 'blue'
|
STYLE_NOFILEITEM_COLOR = 'blue'
|
||||||
|
STYLE_NOTCONTROLLER_COLOR = 'grey'
|
||||||
|
|
||||||
MPLAYER_SLAVE_ARGS = ['-slave', '--hr-seek=always', '-nomsgcolor', '-msglevel', 'all=1:global=4:cplayer=4']
|
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
|
# --quiet works with both mpv 0.2 and 0.3
|
||||||
|
|||||||
@ -122,6 +122,8 @@ class MainWindow(QtGui.QMainWindow):
|
|||||||
useritem = QtGui.QStandardItem(user.username)
|
useritem = QtGui.QStandardItem(user.username)
|
||||||
isController = user.isController()
|
isController = user.isController()
|
||||||
useritem.setData(isController, Qt.UserRole + constants.USERITEM_CONTROLLER_ROLE)
|
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:
|
if user.file:
|
||||||
filesizeitem = QtGui.QStandardItem(formatSize(user.file['size']))
|
filesizeitem = QtGui.QStandardItem(formatSize(user.file['size']))
|
||||||
filedurationitem = QtGui.QStandardItem("({})".format(formatTime(user.file['duration'])))
|
filedurationitem = QtGui.QStandardItem("({})".format(formatTime(user.file['duration'])))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user