mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 22:02:15 +01:00
entities already using label wrap set their defaults
This commit is contained in:
parent
af7063e173
commit
2d9cd37e2c
3 changed files with 16 additions and 13 deletions
|
|
@ -27,6 +27,11 @@ class DictImmutableKeysEntity(ItemEntity):
|
|||
are not real settings values but entities representing the value.
|
||||
"""
|
||||
schema_types = ["dict"]
|
||||
_default_label_wrap = {
|
||||
"use_label_wrap": True,
|
||||
"collapsible": True,
|
||||
"collapsed": True
|
||||
}
|
||||
|
||||
def __getitem__(self, key):
|
||||
"""Return entity inder key."""
|
||||
|
|
@ -169,11 +174,6 @@ class DictImmutableKeysEntity(ItemEntity):
|
|||
"highlight_content", False
|
||||
)
|
||||
self.show_borders = self.schema_data.get("show_borders", True)
|
||||
self.collapsible = self.schema_data.get("collapsible", True)
|
||||
self.collapsed = self.schema_data.get("collapsed", True)
|
||||
|
||||
# Not yet implemented
|
||||
self.use_label_wrap = self.schema_data.get("use_label_wrap") or True
|
||||
|
||||
def get_child_path(self, child_obj):
|
||||
"""Get hierarchical path of child entity.
|
||||
|
|
|
|||
|
|
@ -29,6 +29,12 @@ class DictMutableKeysEntity(EndpointEntity):
|
|||
- clear callbacks
|
||||
"""
|
||||
schema_types = ["dict-modifiable"]
|
||||
_default_label_wrap = {
|
||||
"use_label_wrap": True,
|
||||
"collapsible": True,
|
||||
"collapsed": True
|
||||
}
|
||||
|
||||
_miss_arg = object()
|
||||
|
||||
def __getitem__(self, key):
|
||||
|
|
@ -174,8 +180,6 @@ class DictMutableKeysEntity(EndpointEntity):
|
|||
self.hightlight_content = (
|
||||
self.schema_data.get("highlight_content") or False
|
||||
)
|
||||
self.collapsible = self.schema_data.get("collapsible", True)
|
||||
self.collapsed = self.schema_data.get("collapsed", True)
|
||||
|
||||
object_type = self.schema_data["object_type"]
|
||||
if not isinstance(object_type, dict):
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ from .exceptions import (
|
|||
|
||||
class ListEntity(EndpointEntity):
|
||||
schema_types = ["list"]
|
||||
_default_label_wrap = {
|
||||
"use_label_wrap": False,
|
||||
"collapsible": True,
|
||||
"collapsed": False
|
||||
}
|
||||
|
||||
def __iter__(self):
|
||||
for item in self.children:
|
||||
|
|
@ -139,12 +144,6 @@ class ListEntity(EndpointEntity):
|
|||
# Value that was set on set_override_state
|
||||
self.initial_value = []
|
||||
|
||||
# GUI attributes
|
||||
self.use_label_wrap = self.schema_data.get("use_label_wrap") or False
|
||||
# Used only if `use_label_wrap` is set to True
|
||||
self.collapsible = self.schema_data.get("collapsible") or True
|
||||
self.collapsed = self.schema_data.get("collapsed") or False
|
||||
|
||||
def schema_validations(self):
|
||||
super(ListEntity, self).schema_validations()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue