diff options
author | Julian Eisel <julian@blender.org> | 2020-04-27 17:43:36 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-04-27 18:01:40 +0300 |
commit | b0f207db15c5698f11db1168d2882f056583d6d5 (patch) | |
tree | 10449a797559e5395b38ecfe10c05d195a0a0c1f /source/blender/editors/include | |
parent | 5559edf3c7b854186d2e6cd9c5a492c15df77072 (diff) |
UI: (Internal) utility for more controllable property split layout
Adds a wrapper-struct to create and return the three layouts required
for the propery split layout (i.e. `UILayout.use_property_split`). This
gives more flexibility for special treatment.
E.g. needed for adding the arrow icon buttons when there is a hierarchy
of nodes to be represented in the material properties (needs inserting
in the text column to not offset the split layout).
This commit also makes use of the utility for
`uiItemL_respect_property_split()`.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index f83088dd4d5..709e05c18b6 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -2311,6 +2311,14 @@ void uiItemsFullEnumO_items(uiLayout *layout, const EnumPropertyItem *item_array, int totitem); +typedef struct uiPropertySplitWrapper { + uiLayout *label_column; + uiLayout *property_row; + uiLayout *decorate_column; +} uiPropertySplitWrapper; + +uiPropertySplitWrapper uiItemPropertySplitWrapperCreate(uiLayout *parent_layout); + void uiItemL(uiLayout *layout, const char *name, int icon); /* label */ void uiItemL_ex( uiLayout *layout, const char *name, int icon, const bool highlight, const bool redalert); |