mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
make variant bolded
This commit is contained in:
parent
8672c3803f
commit
c61c3d3f42
1 changed files with 10 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import re
|
||||
import collections
|
||||
|
||||
from Qt import QtWidgets, QtCore
|
||||
|
|
@ -158,7 +159,15 @@ class InstanceCardWidget(CardWidget):
|
|||
icon_layout.addWidget(icon_widget)
|
||||
icon_layout.addWidget(context_warning)
|
||||
|
||||
label_widget = QtWidgets.QLabel(instance.data["subset"], self)
|
||||
variant = instance.data["variant"]
|
||||
subset_name = instance.data["subset"]
|
||||
found_parts = set(re.findall(variant, subset_name, re.IGNORECASE))
|
||||
if found_parts:
|
||||
for part in found_parts:
|
||||
replacement = "<b>{}</b>".format(part)
|
||||
subset_name = subset_name.replace(part, replacement)
|
||||
|
||||
label_widget = QtWidgets.QLabel(subset_name, self)
|
||||
|
||||
active_checkbox = NiceCheckbox(parent=self)
|
||||
active_checkbox.setChecked(instance.data["active"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue