Phase 6 updates

Phase 6 · Slice 35 ·

Foldout

  • Foldout: a Toggle (its text in a label inside the input) and a content container (unity-content) its children go into, hidden (inline display) while the value is false; value and SetValueWithoutNotify move the toggle too; turning the toggle sets the foldout's value and its ChangeEvent stops there (the foldout sends its own); nested foldouts get unity-foldout--depth-N when attached. TreeView's row toggles use Foldout's classes. UXML Foldout with text and value.
  • The default theme indents a foldout's content 30 pixels and gives its checkmark and text Unity's runtime metrics.
  • Checked by ui_toolkit_foldout (6000.3): structure, classes, defaults, values and events (nested ones bubbling), depth classes and styles.
  • The arrow: where Unity's theme draws an image, panels draw a triangle in a foldout checkmark's box (its text color; right while collapsed, down while expanded), so foldouts and tree rows show their state without changing the checkmark's styles. The sample shows two foldouts.
  • Next: reorderable lists (drag to reorder in ListView); MultiColumnListView.