Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
collapsible wrapper added to README and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Dec 1, 2020
1 parent 04d3a0e commit 6b73060
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
25 changes: 22 additions & 3 deletions pype/tools/settings/settings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,11 +436,9 @@
## Proxy wrappers
- should wraps multiple inputs only visually
- these does not have `"key"` key and do not allow to have `"is_file"` or `"is_group"` modifiers enabled
- can't be used as widget (first item in e.g. `list`, `dict-modifiable`, etc.)

### form
- DEPRECATED
- may be used only in `dict` and `dict-invisible` where is currently used grid layout so form is not needed
- item is kept as still may be used in specific cases
- wraps inputs into form look layout
- should be used only for Pure inputs

Expand All @@ -462,3 +460,24 @@
]
}
```


### collapsible-wrap
- wraps inputs into collapsible widget
- looks like `dict` but does not hold `"key"`
- should be used only for Pure inputs

```
{
"type": "collapsible-wrap",
"label": "Collapsible example"
"children": [
{
"type": "text",
"key": "_example_input_collapsible",
"label": "Example input in collapsible wrapper"
}, {
...
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,16 @@
]
}
]
}, {
"type": "collapsible-wrap",
"label": "Collapsible Wrapper without key",
"children": [
{
"type": "text",
"key": "_example_input_collapsible",
"label": "Example input in collapsible wrapper"
}
]
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions pype/tools/settings/settings/widgets/item_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -3768,7 +3768,7 @@ def add_children_gui(self, child_configuration):
return item


class CollapsableWrapperItem(WrapperItemWidget):
class CollapsibleWrapperItem(WrapperItemWidget):
def wrapper_initial_attributes(self, schema_data):
self.collapsable = schema_data.get("collapsable", True)
self.collapsed = schema_data.get("collapsed", True)
Expand Down Expand Up @@ -3955,7 +3955,7 @@ def __init__(self, configuration, parent):

# Wrappers
TypeToKlass.types["form"] = FormItemWidget
TypeToKlass.types["collapsable-wrap"] = CollapsableWrapperItem
TypeToKlass.types["collapsible-wrap"] = CollapsibleWrapperItem

# UI items
TypeToKlass.types["label"] = LabelWidget
Expand Down

0 comments on commit 6b73060

Please sign in to comment.