mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
added bg color for new items
This commit is contained in:
parent
a000c51dd4
commit
b27116102b
1 changed files with 11 additions and 4 deletions
|
|
@ -1332,8 +1332,11 @@ class AssetItem(BaseItem):
|
|||
return super(AssetItem, self)._global_data(role)
|
||||
|
||||
def data(self, key, role):
|
||||
if self._removed and role == QtCore.Qt.BackgroundRole:
|
||||
return QtGui.QColor(255, 0, 0, 127)
|
||||
if role == QtCore.Qt.BackgroundRole:
|
||||
if self._removed:
|
||||
return QtGui.QColor(255, 0, 0, 127)
|
||||
elif self.is_new:
|
||||
return QtGui.QColor(0, 255, 0, 127)
|
||||
|
||||
return super(AssetItem, self).data(key, role)
|
||||
|
||||
|
|
@ -1414,8 +1417,12 @@ class TaskItem(BaseItem):
|
|||
}
|
||||
|
||||
def data(self, key, role):
|
||||
if self._removed and role == QtCore.Qt.BackgroundRole:
|
||||
return QtGui.QColor(255, 0, 0, 127)
|
||||
if role == QtCore.Qt.BackgroundRole:
|
||||
if self._removed:
|
||||
return QtGui.QColor(255, 0, 0, 127)
|
||||
|
||||
elif self.is_new:
|
||||
return QtGui.QColor(0, 255, 0, 127)
|
||||
|
||||
if (
|
||||
role in (QtCore.Qt.DisplayRole, QtCore.Qt.EditRole)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue