UI: add separators in properties editor header tabs.
This commit is contained in:
@@ -680,10 +680,13 @@ static void ui_item_enum_expand(
|
||||
}
|
||||
|
||||
for (item = item_array; item->identifier; item++) {
|
||||
if (!item->identifier[0]) {
|
||||
if (!item->identifier[0] && (item+1)->identifier) {
|
||||
if (radial && layout_radial) {
|
||||
uiItemS(layout_radial);
|
||||
}
|
||||
else {
|
||||
uiItemS(block->curlayout);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -1009,10 +1009,10 @@ void buttons_context_draw(const bContext *C, uiLayout *layout)
|
||||
name = RNA_struct_name_get_alloc(ptr, namebuf, sizeof(namebuf), NULL);
|
||||
|
||||
if (name) {
|
||||
if ((!ELEM(sbuts->mainb, BCONTEXT_RENDER, BCONTEXT_SCENE, BCONTEXT_VIEW_LAYER) && ptr->type == &RNA_Scene)) {
|
||||
if ((!ELEM(sbuts->mainb, BCONTEXT_RENDER, BCONTEXT_SCENE, BCONTEXT_VIEW_LAYER, BCONTEXT_WORLD) && ptr->type == &RNA_Scene)) {
|
||||
uiItemLDrag(row, ptr, "", icon); /* save some space */
|
||||
}
|
||||
else if ((!ELEM(sbuts->mainb, BCONTEXT_RENDER, BCONTEXT_SCENE, BCONTEXT_VIEW_LAYER) && ptr->type == &RNA_ViewLayer)) {
|
||||
else if ((!ELEM(sbuts->mainb, BCONTEXT_RENDER, BCONTEXT_SCENE, BCONTEXT_VIEW_LAYER, BCONTEXT_WORLD) && ptr->type == &RNA_ViewLayer)) {
|
||||
uiItemLDrag(row, ptr, "", icon); /* save some space */
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1241,6 +1241,14 @@ static const EnumPropertyItem *rna_SpaceProperties_context_itemf(
|
||||
RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_TOOL);
|
||||
}
|
||||
|
||||
if (sbuts->pathflag & (1 << BCONTEXT_WORKSPACE)) {
|
||||
RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_WORKSPACE);
|
||||
}
|
||||
|
||||
if (totitem) {
|
||||
RNA_enum_item_add_separator(&item, &totitem);
|
||||
}
|
||||
|
||||
if (sbuts->pathflag & (1 << BCONTEXT_RENDER)) {
|
||||
RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_RENDER);
|
||||
}
|
||||
@@ -1257,8 +1265,8 @@ static const EnumPropertyItem *rna_SpaceProperties_context_itemf(
|
||||
RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_WORLD);
|
||||
}
|
||||
|
||||
if (sbuts->pathflag & (1 << BCONTEXT_WORKSPACE)) {
|
||||
RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_WORKSPACE);
|
||||
if (totitem) {
|
||||
RNA_enum_item_add_separator(&item, &totitem);
|
||||
}
|
||||
|
||||
if (sbuts->pathflag & (1 << BCONTEXT_OBJECT)) {
|
||||
|
||||
Reference in New Issue
Block a user