Fix #145300: Value node displayed value has an offset to the right

Caused by d7fa455e66

Due to an earlier experiment to get right alignment, above commit left a
space in the text (this was later solved by using
`UI_ITEM_R_SPLIT_EMPTY_NAME`, but... for this one node, the name was not
actually empty then...)

Pull Request: https://projects.blender.org/blender/blender/pulls/145303
This commit is contained in:
Philipp Oeser
2025-08-28 15:11:21 +02:00
committed by Philipp Oeser
parent 20b2ec5cdf
commit 81c259d49b

View File

@@ -22,7 +22,7 @@ static void sh_node_value_declare(NodeDeclarationBuilder &b)
{
b.add_output<decl::Float>("Value").custom_draw([](CustomSocketDrawParams &params) {
uiLayout &row = params.layout.row(true);
row.prop(&params.socket_ptr, "default_value", UI_ITEM_R_SPLIT_EMPTY_NAME, " ", ICON_NONE);
row.prop(&params.socket_ptr, "default_value", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
if (gizmos::value_node_has_gizmo(params.tree, params.node)) {
row.prop(&params.socket_ptr, "pin_gizmo", UI_ITEM_NONE, "", ICON_GIZMO);
}