UI: Use correct property split ratio for node socket buttons
This makes the buttons drawn on nodes for unconnected string and color sockets draw with the correct 40% ratio for the label split rather than the old 50% ratio not used elsewhere in Blender anymore. The benefit is a cleaner look, because the button edges line up better with others, and a bit more space to type in attribute names.
This commit is contained in:
parent
d0d0d9d7c6
commit
a363d64b93
|
@ -3429,13 +3429,13 @@ static void std_node_socket_draw(
|
|||
}
|
||||
break;
|
||||
case SOCK_RGBA: {
|
||||
uiLayout *row = uiLayoutSplit(layout, 0.5f, false);
|
||||
uiLayout *row = uiLayoutSplit(layout, 0.4f, false);
|
||||
uiItemL(row, text, 0);
|
||||
uiItemR(row, ptr, "default_value", DEFAULT_FLAGS, "", 0);
|
||||
break;
|
||||
}
|
||||
case SOCK_STRING: {
|
||||
uiLayout *row = uiLayoutSplit(layout, 0.5f, false);
|
||||
uiLayout *row = uiLayoutSplit(layout, 0.4f, false);
|
||||
uiItemL(row, text, 0);
|
||||
|
||||
const bNodeTree *node_tree = (const bNodeTree *)node_ptr->owner_id;
|
||||
|
|
Loading…
Reference in New Issue