mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
allow more options for icons
This commit is contained in:
parent
1f41e03fe0
commit
2fbb6c279b
1 changed files with 9 additions and 1 deletions
|
|
@ -524,7 +524,15 @@ class SceneInventoryView(QtWidgets.QTreeView):
|
|||
submenu = QtWidgets.QMenu("Actions", self)
|
||||
for action in custom_actions:
|
||||
color = action.color or DEFAULT_COLOR
|
||||
icon = qtawesome.icon("fa.%s" % action.icon, color=color)
|
||||
icon_def = action.icon
|
||||
if not isinstance(action.icon, dict):
|
||||
icon_def = {
|
||||
"type": "awesome-font",
|
||||
"name": icon_def,
|
||||
"color": color,
|
||||
}
|
||||
icon = get_qt_icon(icon_def)
|
||||
# icon = qtawesome.icon("fa.%s" % action.icon, color=color)
|
||||
action_item = QtWidgets.QAction(icon, action.label, submenu)
|
||||
action_item.triggered.connect(
|
||||
partial(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue