Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-04-27 16:24:25 +0300
committerJulian Eisel <julian@blender.org>2020-04-27 17:38:27 +0300
commit6842958c9b8f0502148443534a7b38faa0efcd9d (patch)
treefc1e670cf72ea7a021bd09850ded2bd3a1dd3644 /source/blender/editors/interface/interface_layout.c
parentb6592c83b5490f154f27de22e34effa2617a5847 (diff)
UI: Add (internal) option to use property splitting for label-less items
Usually items without labels don't use the property split layout and just use the full layout width. In some cases that is not wanted because it looks odd if single items within the split layout use the full width. The option is unused but would be needed for adding decorators to the material properties.
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r--source/blender/editors/interface/interface_layout.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 49ce1315e7f..2ca4af32bc2 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1969,7 +1969,7 @@ void uiItemFullR(uiLayout *layout,
* Keep using 'use_prop_sep' instead of disabling it entirely because
* we need the ability to have decorators still. */
bool use_prop_sep_split_label = use_prop_sep;
- bool forbid_single_col = false;
+ bool use_split_empty_name = (flag & UI_ITEM_R_SPLIT_EMPTY_NAME);
#ifdef UI_PROP_DECORATE
struct {
@@ -2082,7 +2082,7 @@ void uiItemFullR(uiLayout *layout,
use_prop_sep_split_label = false;
/* For checkboxes we make an expection: We allow showing them in a split row even without
* label. It typically relates to its neighbor items, so no need for an extra label. */
- forbid_single_col = true;
+ use_split_empty_name = true;
}
}
#endif
@@ -2120,7 +2120,7 @@ void uiItemFullR(uiLayout *layout,
}
#endif /* UI_PROP_DECORATE */
- if ((name[0] == '\0') && !forbid_single_col) {
+ if ((name[0] == '\0') && !use_split_empty_name) {
/* Ensure we get a column when text is not set. */
layout = uiLayoutColumn(layout_row ? layout_row : layout, true);
layout->space = 0;